Skip to content

Instantly share code, notes, and snippets.

@fajrif
Created October 31, 2011 20:10
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 fajrif/1328735 to your computer and use it in GitHub Desktop.
Save fajrif/1328735 to your computer and use it in GitHub Desktop.
git rm remote repo
# remove file from stage
git rm --cached --ignore-unmatch <filename>
# to remove the file from the entire repo history
git filter-branch --index-filter 'git rm --cached --ignore-unmatch <filename>' HEAD
# to force update to remote repo, so the remote repo have the same history
git push origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment