Skip to content

Instantly share code, notes, and snippets.

@mustafiz012
Forked from aguilarcarlos/TipsForGit.md
Last active August 28, 2015 18:48
Show Gist options
  • Save mustafiz012/7cfe8c89c0e3bc2d3aba to your computer and use it in GitHub Desktop.
Save mustafiz012/7cfe8c89c0e3bc2d3aba to your computer and use it in GitHub Desktop.
Fixing untracked files
Even if you haven't tracked the files so far, git seems to be able to "know" about them even after you add them to .gitignore.
Run the following commands from the top folder of your git repo.
Step 1. Commit your current changes, or you will lose them.
Then:
git rm -r --cached .
git add .
git commit -m "fixed untracked files"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment