2012-01-17 16 views

回答

2

是的,您可以使用「稀疏結帳」功能執行此操作。

git config core.sparsecheckout true 

編輯.git/info/sparse-checkout文件並添加:

* 
!invisible.js 

然後:

git read-tree -m -u HEAD 

這應該使invisible.js文件從工作目錄中消失(它不會回來更新)。

有關更多信息,請參閱git read-tree documentation的「Sparse checkout」部分。

相關問題