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
  • 464
  • 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,129,465
  • 480
  • 4,036
  • 4,755
0

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

git log --oneline --graph --decorate --all
ishwardgret
  • 990
  • 7
  • 10