When I cloned a repo from GitLab to local, it along with source code it also pulled a file in the root folder caller .gitignore
.
There is also a folder called .git
which contains a directory in info
contains a file called exclude
.
Which one is the one that does the ignore (to me ignore and exclude mean the same)? Is it the ignore or exclude?
They both contain "ignore rules" - filename patterns for which matching untracked files should be ignored.
The difference is that rules in .gitignore
are shared through the repo, whreas rules in info/exclude
are not. So if for some reason you need to locally ignore certain paths in a single clone, you would use info/exclude
; but if a path should be ignored in all clones, you would use .gitignore
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With