Skip to content

Instantly share code, notes, and snippets.

@mynameispj
Last active January 2, 2021 02:37
Show Gist options
  • Star 21 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mynameispj/10143204 to your computer and use it in GitHub Desktop.
Save mynameispj/10143204 to your computer and use it in GitHub Desktop.
Git Ignore SASS cache files
# Ignore docs files
styles/.sass-cache
styles/.sass-cache/*
# Not working?
# Try: http://stackoverflow.com/questions/11451535/gitignore-not-working
# Try: http://stackoverflow.com/questions/1139762/gitignore-file-not-ignoring
@teawithlemon
Copy link

Was just googling this, thanks.

@tucq88
Copy link

tucq88 commented Apr 13, 2015

For people who don't want to copy the link to the browser's address

To untrack a single file that has already been added/initialized to your repository, i.e., stop tracking the file but not delete it from your system use: git rm --cached filename

To untrack every file that is now in your .gitignore:

First commit any outstanding code changes, and then, run this command:

git rm -r --cached .

This removes any changed files from the index(staging area), then just run:

git add .

Commit it:

git commit -m ".gitignore is now working"

@katiekatsup
Copy link

Worked like a charm, thank you for this!

@hayatbiralem
Copy link

Thanks :)

@knibals
Copy link

knibals commented Jun 3, 2015

Thank you @tucq88 for saving us 2 clicks! ;)

@aManNamedJed
Copy link

Thx

@capitalJT
Copy link

Did the trick for me. Thanks!

@marcguyer
Copy link

@belassen
Copy link

like a charm

@brother-donkey
Copy link

Thanks a bunch.

@saravanacu
Copy link

Thanks 👍

@dguzzo
Copy link

dguzzo commented Apr 23, 2017

thanks!

@ndunk28
Copy link

ndunk28 commented Oct 17, 2017

thanks!

Copy link

ghost commented May 31, 2019

Thanks! Worked perfectly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment