Skip to content

Instantly share code, notes, and snippets.

@the-undefined
Created August 12, 2013 10:52
Show Gist options
  • Save the-undefined/6209882 to your computer and use it in GitHub Desktop.
Save the-undefined/6209882 to your computer and use it in GitHub Desktop.
When fetching in git use `-p` flag to delete stale local branches (when their tracking branches have been deleted on the remote repo).
$ git fetch -p
remote: Counting objects: 1, done.
remote: Total 1 (delta 0), reused 1 (delta 0)
Unpacking objects: 100% (1/1), done.
f9b6959..3ff6575 master -> origin/master
x [deleted] (none) -> origin/admin-review-purchase-orders
x [deleted] (none) -> origin/creator-email-notifications
x [deleted] (none) -> origin/new-purchase-order
x [deleted] (none) -> origin/po-status-changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment