Click here to Skip to main content
15,890,527 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I've folders (documents) of same name in different folder paths of the source structure. Some I want to avoid add into the Git repo while other to add. If I put something like below everything removed.

documents/


What I have tried:

So I've added multiple paths, and there a lot.

path/path/documents/
path/documents/
path/path/path/documents


I there a simple way to do this?
Posted
Updated 3-Jul-18 20:13pm

1 solution

If you have a lot of documents directories to ignore and few to allow, you could use whitelists instead:

# Ignore all documents directories
documents/
#Except these
!path/to/folder/documents/
!path/to/another/folder/documents/
 
Share this answer
 
Comments
CodingLover 4-Jul-18 5:26am    
That's exactly I was looking for. Thanks.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900