SHARE
TWEET

Untitled

a guest Jul 19th, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. "Marged"
  2. for branch in `git branch -r --merged | grep -vE "/master$|/develop$"`
  3.     do echo -e `git log --no-merges -n 1 --format="%ci, %cr, %an"  $branch | head -n 1` \\t$branch;
  4. done | sort -r
  5.  
  6. "No-Marged"
  7. for branch in `git branch -r --no-merged | grep -vE "/master$|develop$"`
  8.     do echo -e `git log --no-merges -n 1 --format="%ci, %cr, %an, %ae, " $branch | head -n 1` \\t$branch;
  9. done | sort -r
  10.  
  11.  
  12. " delete remote
  13. git branch -r --merged | grep -vE "/master$|/develop$" | sed -e 's/.*origin\///' | xargs -I % git push --delete origin %
  14.  
  15. " delete local
  16. git branch --merged | grep -vE "/master$|/develop$" | xargs -I % git branch -d %
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top