Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

how to write script to fetch the Branches list and delete from the Bitbucket

harinib April 29, 2020

I would like to know if there any chance is there for script to list branches from repo and delete branches whatever i don't want branches from bitbucket to CSV file 

I tied like this ways can you able to check and let me know 

 

for i in `git branch -a |grep remotes |awk '{print $1}' | cut -d"/" -f 3,4,5 |grep -v ^master$ |grep -v ^HEAD$`; do echo "`git log -1 --pretty=format:\"%an (%ae)\" origin/$i`|$i"; done |sort

 

git branch -a --sort=creatordate --format "%(creatordate:relative);%(refname:lstrip=1)"| column -s ";" -t

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events