Skip to content

Instantly share code, notes, and snippets.

@scollett
Created February 21, 2014 18:34
Show Gist options
  • Save scollett/9140378 to your computer and use it in GitHub Desktop.
Save scollett/9140378 to your computer and use it in GitHub Desktop.
Tibits of git.fu that are helpful

Removing a file/folder from git git filter-branch --prune-empty --tree-filter 'git rm -rf --cached --ignore-unmatch FOLDER_OR_FILES_TO_REMOVE' --tag-name-filter cat -- --all git filter-branch --prune-empty --index-filter 'git rm -rf --cached --ignore-unmatch FOLDER_OR_FILES_TO_REMOVE' --tag-name-filter cat -- --all rm -rf .git/refs/original/ git reflog expire --expire=now --all git gc --aggressive --prune=now

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