Issues with git using .gitignore
为情所困
为情所困 2017-05-02 09:52:12
0
3
696

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

为情所困
为情所困

reply all(3)
滿天的星座
git rm a.txt --cached

Also add a.txt to .gitignore

世界只因有你
  1. git update-index --assume-unchanged

  2. git filter: see How to make Git ignore single/multiple lines in a file

左手右手慢动作

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.

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