I am new to git. Some time ago, I have set it up on my MacBook Pro and havent used it for months. Now I wonder how can I figure out following:
Did I set already global gitignore and how to find out where it is located on my MacBookPro?
Did I set multiple global gitignore files and how to find where they are on my system?
If I have multiple global gitignore files, which one I is set to be used by git currently?
Please, provide best explanation, I am new to both MacBook terminal and git. Thanks
The gitignore you are using is the one in the closest parent directory to where your git repo is initialized. So if you have a file system like this:
root/
| .gitignore
| user/
| .gitignore
| dev/
| .gitignore
| project/
If project
is the directory of your git repository then the .gitignore being used is the one in dev
as it is the closest parent to project
.
To check what your global .gitignore is run git config --get core.excludesfile
.