The incidental problems are recorded as follows:
We usually have some configuration files or local files that we don’t want to upload to the server when we’re in the push project
At this time we will set up through the.Gitignore file
Generally set like this:
Code is as follows
Noticed the inside of the config.* config.py two is duplicate definition?
The reason is this. The original idea is to screen all the files at the beginning of the config
But found that does not work, the config.py file upload up, initially thought it was a wildcard wrong, or how, and wrote a direct file name way
Still not, change config.py upload it up.
It looks like the.Gitignore setting doesn’t work or doesn’t work
Then I searched the Internet for a circle, and there were more than one of the people who met this problem, emptying the cache with this command, and the.Gitignore change settings were effective..
Git RM -r –cached
The above git using.Gitignore settings does not work or does not work, the solution is to share all of the content of small, hope to give you a reference.