Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Bash
Posted by: Dmitriy Lanets
Added: Mar 23, 2018 10:45 AM
Modified: Mar 23, 2018 10:51 AM
Views: 26
Tags: git
  1. 1. сначала выгрузим их локально
  2. git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
  3.  
  4. 2. на сервере
  5. git branch --merged develop | grep -v "\master" | grep -v "\* develop" | xargs -n 1 git push origin -d
  6.  
  7. 3. локально
  8. git branch --merged develop | grep -v "\master" | grep -v "\* develop" | xargs -n 1 git branch -d
  9.  
  10.  
  11.