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?
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:
Has the same effect.
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