0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

gitプロジェクトの除外ファイルを設定する。

Last updated at Posted at 2019-04-13

gitプロジェクト直下にある.gitignoreを編集する。

①C:/Users/{userName}/.gitignoreを編集する。

.gitignore
pom.xml    // pom.xmlを除外する。
bin/       // classファイルを除外する。
*.csv      // 全CSVファイルを除外する。

②作成した除外ファイルを有効にする。
C:/Users/{userName}/.gitconfigを編集する

.gitconfig
[core]
	excludesfile = ~/.gitignore

【メモ】
・上記は、全プロジェクトに対して有効
・ただし、すでにaddまたはcommitしたファイルは除外されない。
・SourceTree上でも.gitignoreを編集できるけど
 それはプロジェクト単位のやつで、かつ「.gitignore」
 自体がaddの対象になってしまうので、あんまりやりたくない。
 (間違えてcommitしたら困る)
・逆にpullしてくるファイルが除外対象になるかどうかは未確認。
 (ならないとは思うけど。)

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?