There is a configuration file
Save a releasable state on git
But local testing requires changes to the configuration file
These changes do not want to be submitted to git
Previous practicesgit update-index --assume-unchanged
Let the files not be tracked locally
But this approach has no effect on other branches
Is there any command that can achieve the effect I want?
为情所困2017-05-02 09:28:51
git-extras provides a command git lock to implement this function. After submitting the file, use the git lock command to lock the configuration file.
Of course, the implementation of this git lock command is very simple, packaging the functions that come with git:
git update-index --skip-worktree 文件路径
Has the same effect.
迷茫2017-05-02 09:28:51
I don’t know if the .gitignore file is satisfactory. After submitting it once, fill in the configuration file and add it to the .gitignore file, and it will not be submitted again