Global Ignore
Foreword π
Instructions written for linux (not tested on Windows)
Specify global ignore file π
Open git config file π
Itβs ok if the file does not exist. You can just create it.
Note: It is unlikely that the file does not exist
because mandatory settings like your name and email address go in the user
section of that file.
nano ~/.gitconfig
Create or find core
section π
It starts with the text [core]
.
If section did not exist (or the file did not exist) then simply add that text.
Under that section add the following
excludesFile = ~/.gitignore_global
Final content (ignoring other settings) should look like
[core]
excludesFile = ~/.gitignore_global
Add entries to file π
Use the normal git ignore format. More info on that can be found here.
Add them to the file specified in the last step
nano ~/.gitignore_global