Last Updated: February 25, 2016
·
619
· joecritch

Force ignore on your .gitignore

Some times those existing files don't ignore themselves...

(Well, I think it's pretty much all the time.)

Add this to your ~/.aliases dot file:

alias gig="git rm -r --cached . && git add . && git commit -m $*"

(Taken from this <a href="http://stackoverflow.com/questions/1139762/gitignore-file-not-ignoring">Stackoverflow post</a>.)

Then use it with the following command:

gig "Ignoring .DS_Store"