[英]How to stop tracking file in Git BUT allow “ignorable” changes to it on local copy?
[英]Git keep file in repository but stop tracking local changes
我有一個帶有虛擬值的app.properties
文件,我已經提交並推送到我的Git存儲庫。 我現在想告訴Git:
app.properties
文件的更改 app.properties
文件。 我已將*.properties
添加到我的.git/info/exclude
文件中,但git status
仍然檢測到我對本地app.properties
文件所做的任何更改。
您可以說使用--assume-unchanged
命令將文件視為未更改的git
git update-index --assume-unchanged app.properties
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.