Make life simple — Un-track files added to a git repo

Madikanti
1 min readAug 5, 2020

Before you start, write your ignore rules on .gitignore file.

  1. Commit all your changes, just to not lose while you try these steps
  2. Clear your repo
git rm -r --cached .

3. Add everything back

git add .

4. Commit back

git commit -m ".gitignore fix"

You are good now, you can push the changes to remote.

🤙🏼

--

--

Madikanti

Engineer at Amazon | Polymath in progress | AI/ML | Film | Writer | India’s Former Fastest Blindfolded Rubik’s Cube Solver | Get in touch: www.smad.io