Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save m2web/2d79223f286b92b33ce34cc3fa88e960 to your computer and use it in GitHub Desktop.
Save m2web/2d79223f286b92b33ce34cc3fa88e960 to your computer and use it in GitHub Desktop.
# *****************************************************************
# After updating the .gitignore file to ignore previously
# tracked file(s) by Git. However, Git is still tracking
# the file(s) that you added to .gitignore. Please stop the
# files from being tracked! :-)
# *****************************************************************
# For a single file staging (a.k.a cache or index):
git rm --cached <theFileName>
# To remove a whole folder from staging:
git rm -r --cached <theFolderName>
# remove all files from staging
git rm -r --cached .
#add files back to be tracked not in .gitignore
git add .
git commit -m "Update to .gitignore applied"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment