My project looks like this:
.gitignore:
/node_modules
/dist
/.tmp
/.sass-cache
.sass-cache
/bower_component
No idea why, but .sass-cache
is still being staged:
User@User-PC MINGW64 /e/alex/istagingadmindashboard/frontEnd (deve)
$ git add .
User@User-PC MINGW64 /e/alex/istagingadmindashboard/frontEnd (deve)
$ git status
On branch deve
Your branch is up-to-date with 'remotes/origin/deve'.
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
modified: .sass-cache/a1ee9da9874bbf1b217c6f2a5cd8c2c7c5ee78fe/main.scssc
modified: app/scripts/building/uploadPage.js
modified: app/styles/main.scss
modified: app/views/building/uploadproject.html
Any ideas of why?
The problem is that you already uploaded the folder .sass-cache to the server. You see that it says modified
. You have to do:
git rm .sass-cache/*
git commit -a -m "removed folder"
git push origin master
The next time you do git status
you won't see the folder.
Also, you don't need to add both
/.sass-cache
.sass-cache
Only the last one is enough
The .gitignore
file was likely updated after that particular folder's contents were staged. To complete the circle, perform git rm -r --cached .sass-cache/
.
Also, you only need one entry for it in .gitignore
; preferably, one with a slash at either the front or the end to denote it as a directory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With