Using SASS with Git, what files do I ignore and how?

Viewed 26287

I've got a framework in my /project directory, where I have multiple .sass-cache folders.

For example, I could have this

/project/-/-/one/.sass-cache

And this

/project/-/-/two/.sass-cache

And this

/project/three/.sass-cache

And I want to add all of the to .gitignore. I've tried this:

# Sass #
###########
*.sass-cache*

But it fails and git still picks up changes in them. How do I properly add my .sass-cache folders to my .gitignore file?

6 Answers

For those of you who set up your workflow with npm install node-sass.

  • Before you do git init do the following
  • create .gitignore in root of your project
  • the .gitignore file will be blank in your code editor
  • in the .gitignore file type node_modules
  • now all your dependencies won't be added to your repository
  • now do your git init etc...

source. traversy media video "Responsive Portfolio, SASS workflow setup"

Related