Reputation: 3323
I have a folder public/lib
which was ignored by GIT as i added following to .gitignore
file :
public/lib
I made initial committ & pushed changes into remote repository. Later realized i need to commit one folder in public/lib
called templates
. Then found this approach for Make .gitignore ignore everything except a few files
Changed my .gitignore
file to :
public/lib
!public/lib/template/**/*
This is not helping me. I dont see template
folder considered by GIT on next git status
.
I am new to Git.
Upvotes: 3
Views: 231
Reputation: 521467
Your whitelist for the subdirectory looks a bit off to me. Try this:
public/lib # blacklist public/lib folder
!public/lib/template # but exclude the template subfolder
Upvotes: 1