Skip to content

Instantly share code, notes, and snippets.

@paul-vd
Last active February 25, 2021 09:22
Show Gist options
  • Save paul-vd/b37219f6cc614c4203a9f8c8b304bacb to your computer and use it in GitHub Desktop.
Save paul-vd/b37219f6cc614c4203a9f8c8b304bacb to your computer and use it in GitHub Desktop.
This helps untract files previous pushed to repo, and then added to .gitignore

This helps untract files previous pushed to repo, and then added to .gitignore

git rm -r --cached .
git add .
git commit -m "chore: untracked files issue resolved to fix .gitignore"

Here is another example un-tracking files like .env and then removing it from the history

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment