无法让git忽略以前跟踪的文件

时间:2016-10-12 09:16:30

标签: git

我正在追踪git中的某个文件,但又不想跟踪它

± |master ↑1 ?:1 ✗| → git status
On branch master
Untracked files:
  (use "git add <file>..." to include in what will be committed)

    data/foo.txt

nothing added to commit but untracked files present (use "git add" to track)

± |master U:1 ?:1 ✗| → git update-index --assume-unchanged data/foo.txt
fatal: Unable to mark file data/foo.txt

± |master U:1 ?:1 ✗| → git rm --cached data/foo.txt
fatal: pathspec 'data/foo.txt' did not match any files

如何说服git忽略data/foo.txt

0 个答案:

没有答案
相关问题