How to handle git ignore files that cannot be ignored

reason:

.gitignore file exists on server

For example, there is a test.proj file in .gitignore

Then it will be invalid when ignoring

Solution:

1. Backup test.proj and .gitignore files

2. Delete the test.proj and .gitignore files in the project

3. Delete the test.proj and .gitignore files on the server

4. Local git pull

5. Copy the backup test.proj and .gitignore files to the project,


It can be solved by the above method


Notice:

It is best to add the .gitignore statement to the first line of the .gitignore file

In addition, there is another method that may be more suitable, to be tested next time:

http://www.pfeng.org/archives/840


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325776825&siteId=291194637