Skip to content

Instantly share code, notes, and snippets.

@vbajpai
Created February 21, 2013 12:54
Show Gist options
  • Save vbajpai/5004553 to your computer and use it in GitHub Desktop.
Save vbajpai/5004553 to your computer and use it in GitHub Desktop.
delete a git branch and all its associated history.
[master] $ git branch -D topic
[master] $ git reflog expire --expire=now --all
[master] $ git gc --aggressive --prune=now
[master] $ git repack -a -d -l
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment