2017-02-23 4 views
0

git add --allを使用する場合、.gitignoreはステージングに追加されません。それでは、私は手動でこのgit addを使用するとステージングに.gitignoreをどのように追加しますか?--all

$ git add .gitignore 
The following paths are ignored by one of your .gitignore files: 
.gitignore 
Use -f if you really want to add them. 

よう.gitignore追加しようだから私は.gitignoreファイルから.gitignoreエントリを削除する迷惑

+5

まあ、代わりに '.gitignore'ファイルをgitignoreしないように選択することもできます... – Amber

+0

おそらく:http://stackoverflow.com/a/9436505/4280359。 –

答えて

2

ある.gitignoreを追加強制的に-fを使用する必要があります。

+0

.gitignoreは.gitignoreにありません。 Just Pods/iOSプロジェクト用 –

+0

@MichaelL '.gitignore'は' .gitignore'ファイルの一部です。 'git check-ignore -v .gitignore'を実行すると、' .gitignore'ファイルが '.gitignore'ファイルを無視するかどうかを知ることができます。 – Alderath

関連する問題