The local warehouse has a.txt file, and the remote warehouse also has a.txt file.
When .gitignore writes a.txt, why does it delete the remote repository? ?
How can I save two different versions locally and remotely, and ignore a.txt when submitting locally or remotely? ? ?
世界只因有你2017-05-02 09:54:12
git update-index --assume-unchanged
git filter: see How to make Git ignore single/multiple lines in a file
ringa_lee2017-05-02 09:54:12
Local and remote are meant to be synchronized. It’s not impossible for you to use this method, but what is your X requirement?
The most common is to deal with local configuration files. In this case, just let the program choose the correct configuration file to load, such as through command line options or environment variables. A better approach is to keep the configuration file out of version control (just put an example or template in it). Configuration files are managed manually or through means such as Salt.