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.
The following ~/.gitignore_global file will cause .java-version files to always be ignored within your Git setup:
1 2 | # jenv.java-version |
Also have a look at the GitHub documentation.
Published on Java Code Geeks with permission by Sebastian Daschner, partner at our JCG program. See the original article here: Global gitignore Opinions expressed by Java Code Geeks contributors are their own. |
Thank you!
We will contact you soon.
Sebastian DaschnerDecember 15th, 2019Last Updated: December 10th, 2019

This site uses Akismet to reduce spam. Learn how your comment data is processed.