Skip to content

Instantly share code, notes, and snippets.

@mynameispj
Last active January 2, 2021 02:37
Show Gist options
  • Select an option

  • Save mynameispj/10143204 to your computer and use it in GitHub Desktop.

Select an option

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
Copy Markdown

Was just googling this, thanks.

@tucq88
Copy link
Copy Markdown

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
Copy Markdown

Worked like a charm, thank you for this!

@hayatbiralem
Copy link
Copy Markdown

Thanks :)

@knibals
Copy link
Copy Markdown

knibals commented Jun 3, 2015

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

@aManNamedJed
Copy link
Copy Markdown

Thx

@jabaltorres
Copy link
Copy Markdown

Did the trick for me. Thanks!

@marcguyer
Copy link
Copy Markdown

@belassen
Copy link
Copy Markdown

like a charm

@brother-donkey
Copy link
Copy Markdown

Thanks a bunch.

@saravanacu
Copy link
Copy Markdown

Thanks 👍

@dguzzo
Copy link
Copy Markdown

dguzzo commented Apr 23, 2017

thanks!

@ndunk28
Copy link
Copy Markdown

ndunk28 commented Oct 17, 2017

thanks!

Copy link
Copy Markdown

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