$ cat .hgignore
.hgignore
$ hg status
M file1
M file2
M src/project.xml
我不想跟蹤project.xml
所以我跑
echo "project.xml" >> .hgignore
,其結果是
$ cat .hgignore
.hgignore
project.xml
$ hg status
M .hgignore
M file1
M file2
M src/project.xml
所以.hgignore
現在被修改,即使它不應該被跟蹤,也沒有什麼會發生與project.xml
。這是什麼意思?
你確定'src/project.xml'還沒有被'hg'跟蹤的文件中嗎? – Atropo
@Atropo它是......但我認爲把它放入'.hgignore'會將它從那裏移除。 – user219882
也許這個問題可以幫助你:[如何停止跟蹤文件,而不刪除它在mercurial](http://stackoverflow.com/questions/8482538/how-to-stop-tracking-a-file-without-deleting-該文件上,善變)。 – Atropo