I have a .gitignore
file like this:
./dist/
However when I get the unstaged changes
$ git status
the dist
directory is still shown as changed. What am I doing wrong?
I have a .gitignore
file like this:
./dist/
However when I get the unstaged changes
$ git status
the dist
directory is still shown as changed. What am I doing wrong?
Solution 1:
Try this (backup your ./dist/ directory before proceeding):
git rm --cached
The above command will remove ignored files, so you can expect your "./dist/" directory to be removed. From the next time you change anything inside this directory will be ignored.
Solution 2:
Remove "./dist/" directory manually and commit. If you create the same directory once again it will be automatically ignored.
If nothing works, check your .gitignore file.
If the files were already committed, you need to clear the cache. Please follow this answer.
Use git rm command to achieve it.
git rm -r --cached your-ignore-folder-name