Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

gitignore ignore everything except

# ignore everything in current directory
/*

# !pattern now negates the "ignore everything" and keeps 'pattern'

# keep .gitignore
!.gitignore 

# keep mydirectory, along with everything inside it 
!mydirectory/
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #gitignore #ignore
ADD COMMENT
Topic
Name
3+5 =