您的位置:首页 > 其它

Git: untrack a file in local repo only and keep it in the remote repo

2016-10-13 16:51 429 查看
You could update your index:

git update-index --assume-unchanged nbproject/project.properties

and make sure it never shows as "updated" in your current repo.
That means it won't ever been pushed, but it is still present in the index.
(and it can be modified at will in your local working tree).

to revert that state (from git-ready):

git update-index --no-assume-unchanged


to see all assume unchanged files (from Gabe Kopley's comment)

git ls-files -v | grep '^h '
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐