Skip to content

Instantly share code, notes, and snippets.

@iAmrSalman
Created November 8, 2017 14:03
Show Gist options
  • Save iAmrSalman/4def06d6bf8400252e27d48d2fa9f3a7 to your computer and use it in GitHub Desktop.
Save iAmrSalman/4def06d6bf8400252e27d48d2fa9f3a7 to your computer and use it in GitHub Desktop.
[remove ignored files after push] #git

The series of commands below will remove all of the items from the Git Index (not from the working directory or local repo), and then updates the Git Index, while respecting git ignores. PS. Index = Cache

First:

git rm -r --cached . 
git add . 

Then:

git commit -am "Remove ignored files"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment