有時候在使用 git 時,明明將檔案加入至 .gitignore,但檔案仍然在版本追蹤中

紀錄一下在 stackoverflow 查到的解法。


git rm -r --cached .
git add .
git commit -m "fixed untracked files"

 

參考資料:

http://stackoverflow.com/questions/11451535/gitignore-is-not-working

Leave a Reply