Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Un-ignore all files in global .gitignore

After looking at git ignore exception, I realized that one can ignore files in a repository from a global .gitignore file.

Is there any way that you can override all rules from the global .gitignore file, so that the repository will have everything in it and nothing ignored? (besides un-ignoring every file individually)

like image 305
Blue Ice Avatar asked Oct 31 '14 16:10

Blue Ice


2 Answers

Create a .gitignore in the repo folder with one rule:

!*

This forgets the rules (with !) of all of the files (*) in the main .gitignore.

like image 165
Blue Ice Avatar answered Oct 21 '22 20:10

Blue Ice


You can.

Create you own .gitignore file with appropriate rules and put into directory in where it shall apply. The rules will be applicable for a directory with local .gitignore and its subdirs.

like image 36
Valeri Atamaniouk Avatar answered Oct 21 '22 19:10

Valeri Atamaniouk