Is there a script to list git branches created by me?

This command lists all branches and their author names

git for-each-ref --format=" %(authorname) %09 %(refname)" --sort=authorname 

If you are using github you can also visit https://github.com/author/repo/branches/yours to get all your branches

If you want to just delete all the already merged branches you can us the command

git branch --merged | grep -v "\*" | grep -v master | grep -v dev | xargs -n 1 git branch -d

For more details of git for-each-ref visit here.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)