Skip to content

Instantly share code, notes, and snippets.

@jdu
Created August 15, 2012 13:52
Show Gist options
  • Save jdu/3360334 to your computer and use it in GitHub Desktop.
Save jdu/3360334 to your computer and use it in GitHub Desktop.
Keep your Repo Clean
# Tag the archive
git tag archive/<branchname> <branchname>
# Delete the branch
git branch -d <branchname>
# To restore the branch, checkout from the tag
git checkout -b <branchname> archive/<branchname>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment