How to gitignore an existing file

Adam K Dean - Jan 9 '14 - - Dev Community

You have a file which you now want to ignore, such as a compiled css file, but git is already tracking it.

First, add the path to your .gitignore file:

src/path/to/file/style.css
Enter fullscreen mode Exit fullscreen mode

Then, in git bash, we want to clear the cache, so run these commands:

git rm -r --cached .
git add .
git commit -m ".gitignore is now working"
Enter fullscreen mode Exit fullscreen mode

Now push your changes and be free of these bothersome files!

More info: http://stackoverflow.com/questions/11451535/gitignore-not-working

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player