Answer the question
In order to leave comments, you need to log in
Why is GitHub Desktop ignoring gitignote?
Greetings!
I'm just learning about git, but for now I don't have much time, I decided to try GitHub Desktop.
Everything seems to be clear, it works and visually everything is clear.
But the problem is that I can't make it ignore directories and files...
I create a local repository, add it to .gitignore
system/storage
image
*.log
Answer the question
In order to leave comments, you need to log in
*.log
This entry will exclude files from the root directory
**/*.log
This entry will exclude files from all directories, recursively
Read more https://git-scm.com/docs/gitignore#_pattern_format
First remove this file from the repository, then add it to .gitignore.
.gitignore only affects files that are not in the repository. If they were previously committed, you will have to make a commit where these files are removed from the repository. Only after that your .gitignore will start working as it should.
Just like that, files from the repository cannot suddenly disappear.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question