菜单

Git does not work or does not work with.Gitignore settings

2017年11月22日 - PHPer

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

###################

*.com

*.txt

*.class

*.dll

*.exe

*.7z

*.gz

*.iso

*.jar

*.rar

*.tar

*.zip

*.log

*.sql

*.sqlite

*.pyc

*.excude

*.bak

Config.*

.idea

.DS_Store*

Ehthumbs.db

Thumbs.db

Config.py

Setting.py

Test.html

Bak.html

Untitled

.idea

 

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

Very troublesome.

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.

发表评论

电子邮件地址不会被公开。