12 Jan 20201 min read

Untrack files already added to the repository

There always comes a time when you are in a hurry or simply did not know that that specific file or folder should be ignored. Then you modify the .gitignore file and that one or more files are still there... what you should do now? Thankfully, there is an easy way to fix that. But, before you execute those steps commit your changes as you might lose them!

git rm -r --cached .
git add .

And now any file that should be ignored will be deleted and you can enjoy your clean and shiny repository.

ADVERTISEMENT
Sponsor Ordinary Coding
Sponsor Ordinary Coding

If you are interested in advertising your application or service on my blog, get in touch with me by email ordinary.coding@protonmail.com. If you are an indie developer you can have your app advertised completely for free!