0
0

More than 3 years have passed since last update.

gitで自分のローカル環境ファイルだけ無視したい

Last updated at Posted at 2020-04-13

やりたいこと

  • gitで自分のローカル環境ファイルだけ無視したい。
  • 共通の.gitignoreは編集したくない。

色々参考にして、.git/info/excludeファイルに追記すればOKということがわかった。
ただ自分の場合は.gitディレクトリ内にinfoディレクトリもなければexcludeファイルも無かったのでそこからの適用方法。

まずはターミナルでプロジェクトディレクトリに入ったあと、

プロジェクトフォルダから.gitディレクトリに移動

$ cd .git

infoディレクトリ作成

$ mkdir info

excludeファイル作成

ディレクトリ移動

$ cd info

excludeファイル作成

$ touch exclude

.git/info/にexcludeファイルが作成されていることを確認。

テキストエディタでexcludeファイルを開き、.gitignoreと同じ要領で除外ファイルを適用。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0