以前也有同樣的問題,但解決方案不適用於我。mercurial hgignore不會忽略目錄
我想指示Mercurial忽略名爲.metadata的文件夾,將它添加到.hgignore文件中。這裏是我的.hgignore文件:
glob:.hgignore
glob:.hgignore~
glob:.metadata/*
我已成功測試忽略.hgignore和.hgignore_作品。如果我刪除前兩行並運行hg狀態,它們將顯示出來。如果我包含前兩行並運行hg狀態,它們會消失。但它不適用於.metadata文件夾。上面的語法是在下面引用的解決方案中報告的語法。它不適合我。我也試過glob:.metadata /。
臨時解決方法是不要在.metadata文件所在的工作區上使用Mercurial。 ;-)
歡迎任何建議,謝謝!
編輯:解決方案,所以看來這個工程:
glob:.metadata
它也簡單,因此更漂亮。感謝greut指出它。
how to add a dot-directory to mercurials hgignore
可能重複[如何添加點目錄汞hgignore(http://stackoverflow.com/questions/4288093/how-to-add-a-dot-directory-to-mercurials-hgignore) – 2012-01-15 15:46:58