github - How does git automatically ignore some files?
为情所困
为情所困 2017-05-02 09:39:25
0
2
594

I have a project locally that is synchronized with github in both directions, but when I debug it locally, there is a log file all.logThis file will also change, and then when I submit it to git, it will be pulled from the cloud When I came down, it said there was a conflict...? Because the log files in the cloud will also change.

Then it prompts that synchronization failed, saying that conflicts need to be handled manually. Is there any way to directly ignore all files with log ending format when submitting?

为情所困
为情所困

reply all(2)
阿神

Add *.log to the .gitignore file

给我你的怀抱

First add all.log to .gitignore
Then remove all.log in git

git rm --cached all.log

Submit the changes to github, all.log will not be submitted next time

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