简体   繁体   中英

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)

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

!*

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM