Posted By

beneberle on 03/07/12


Tagged

git


Versions (?)

Last Edited at 03/07/12 02:53am

Viewed 5 times

Git prune remote and local branches


/ Published in: Bash

URL: http://kparal.wordpress.com/2011/04/15/git-tip-of-the-day-pruning-stale-remote-tracking-branches/

http://yuji.wordpress.com/2010/06/11/git-delete-remote-branch/

  1. # see what's out there
  2. git remote show origin
  3.  
  4. # remove the remote branch 'branch-name'
  5. git push origin :branch-name
  6.  
  7. # see what branches are only on local and no longer tracked
  8. git remote prune origin --dry-run
  9.  
  10. # run again without --dry-run to actually prune the local branch

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.