Git Command for a custom purpose

50 views Asked by At

There are a lot of feature / hotfix Git branches I created from dev branch and developed things and merged back to dev branch. But, meanwhile I forgot to delete local feature / hotfix branches after merging with the development dev branch. I would be happy to know if there is a command which would list all the branch names that had been checked out from dev branch initially and merged to dev branch after its completion. Also, if possible fetch all the branches which are deleted remotely but not locally. Currently I am standing at dev branch.

I have used

git log dev --pretty=oneline --graph

command to see all merge and pull requests created from dev branch. But then I needed to inspect to find out the branch names. If there is a specific command to output the branch names, it would have been better. Thank you for any help :)

1

There are 1 answers

2
lemonhead On

You can find all branches that are fully merged with the dev branch (including dev itself) using

git branch --merged dev