How can git submit a file only once, and then no changes to the file will be submitted, and all branches will take effect?
世界只因有你
世界只因有你 2017-05-02 09:26:51
0
2
1031

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 practices
git 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?

世界只因有你
世界只因有你

reply all(2)
为情所困

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.

迷茫

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template