1

I git tag every production release. It would be nice if i am able to know the branches merged into the repository between the latest production code with the previous release.

WKL
  • 504
  • 1
  • 5
  • 17

2 Answers2

0

That would be a script:

You can start by listing commits between two (release) tags:

git log --pretty=oneline tagA..tagB

Here: commits reachable from tagB but not tagA, with tagB being more recent than tagA.

For each commit, you can check if it is a merged commit:

git show --no-patch --format="%P" <commit hash>

If this is not empty (there is a parent commit merged), you can see the branch(es) part of that parent commit.

git branch --contains <commit>
git branch -r --contains <commit>
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
0

You check the branch merge and nesting in graph by this :

git log --oneline --graph --decorate --all
ishwardgret
  • 1,068
  • 8
  • 10