I am using Git
repository. I have a Release
branch which is behind Master
branch. I normally merged development branches to the Master
and only QA verified branches merged to Release. Is there anyway to list out the branches which have been merged to Master
but not merged to Release
branch? This way it will be easy for me to list out which are the branches have been merged to Master
also merged to Release
.
Asked
Active
Viewed 159 times
0

Paresh Masani
- 7,474
- 12
- 73
- 139
2 Answers
1
You can list the merged branches with git branch --merged <branch name>
. So in your case you'd run
$ git branch --merged Master
... branches ...
$ git branch --merged Release
... branches ...
and look for branches that appear in the first output but not the second. I'm sure it's possible to do a oneliner but I'm no shell guru.
Depending on whether you want to include remote branches or list only remote branches you have to use the -a
or -r
flags respectively.

musiKk
- 14,751
- 4
- 55
- 82
0
try this
git log --graph --oneline --all
Look for the merges in between this output.
For more information read this question as well.

Community
- 1
- 1

cafebabe1991
- 4,928
- 2
- 34
- 42