Posted on: Written by: K-Sato
⚠️ This article was posted over 2 years ago. The information might be outdated. ⚠️

Table of Contents

Commit all your changes

Before proceeding, make sure all your changes are committed, including your .gitignore file.

Remove everything from the repository

To clear your repo, use:

$ git rm -r --cached .

You can untrack a specific file with:

$ git rm -r --cached foo.txt

Re-add everything

$ git add .

Commit

$ git commit -m ".gitignore fix"

References

About the author

I am a web-developer based somewhere on earth. I primarily code in TypeScript, Go and Ruby at work. React, RoR and Gin are my go-to Frameworks.