Global gitignore [Code Snippet]
Learn more about global gitignore, a widely used Git feature that allows files to be ignored within the Git repository.
Join the DZone community and get the full member experience.Join For Free
A widely used Git feature is to use local
.gitignore files which list which names and patterns of files and directories will be ignored within the Git repository.
There is also the possibility to create a system-wide
gitignore file, which lists patterns that should always be ignored in all of the user's Git repositories.
You can point to the file in your Git config via
git config --global core.excludesfile ~/.gitignore_global.
~/.gitignore_global file will cause
.java-version files to always be ignored within your Git setup:
Also, have a look at the GitHub documentation.
The content of this post was reposted from my newsletter issue 028. All opinions are my own and do not reflect those of my employer or colleagues.
Published at DZone with permission of Sebastian Daschner. See the original article here.
Opinions expressed by DZone contributors are their own.