Loading episodes…
0:00 0:00

Git - global .gitignore file

00:00
BACK TO HOME

Git - global .gitignore file

10xTeam September 06, 2020 1 min read

In this quick tip, we’ll see how to configure Git to use a global .gitignore file.

Git allows you to use a global .gitignore for all your repositories. Let’s see how.

First, create a ~/.gitignore in your home folderand anything that should be ignored when pushing your code.

Next, instruct Git to use the file using the following command:

$ git config --global core.excludesfile ~/.gitignore

That’s, you can now use the global ~/.gitignore file to exclude files across all your projects, but you can also use a .gitignore file inside your project and both will be used by Git.


Join the 10xdev Community

Subscribe and get 8+ free PDFs that contain detailed roadmaps with recommended learning periods for each programming language or field, along with links to free resources such as books, YouTube tutorials, and courses with certificates.

Audio Interrupted

We lost the audio stream. Retry with shorter sentences?