Skip to content

Instantly share code, notes, and snippets.

@ildus
Created July 29, 2014 15:11
Show Gist options
  • Save ildus/d2a9dd9ada578ed74676 to your computer and use it in GitHub Desktop.
Save ildus/d2a9dd9ada578ed74676 to your computer and use it in GitHub Desktop.
пометить удаленные как локальные:
for b in `git branch -a | grep -Po '(?<=remotes/origin/).*'`; do git checkout $b; done
удалить удаленные по шаблону:
for b in `git ls-remote origin | grep -Po 'origin.*'`; do git push origin :$b; done
удалить локальные по шаблону:
for b in `git branch -a | grep -Po 'origin2.*'`; do git branch -D $b; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment