-1

With this command

git branch --merged

I can see all the merges. For example

develop
  feature/az***_STAGING
  feature/az***_POC
  feature/az***_ricerche
  feature/az***_gp
  feature/patch_puntamento
  hotfix/az***_recupero
  prova_da_rinominare

But how can I see when branch was merged? For example

  feature/az***_STAGING     01/01/2022
  feature/az***_POC         15/03/2022
Lore
  • 1,286
  • 1
  • 22
  • 57

2 Answers2

2

I think this answer https://stackoverflow.com/a/1441062/7559642 combined with --merges should do what you want: git log --pretty=format:"%h%x09%an%x09%ad%x09%s" --merges

tomwaitforitmy
  • 509
  • 3
  • 16
0

To spot the first merge commit that came after said branch, you can try :

git rev-list --merges --ancestry-path <branch_name>..master | tail -1

# to inspect the history of the above commit :
git log --oneline --graph <sha>

# or as a one liner :
git log --oneline --graph $(git rev-list ...)
LeGEC
  • 46,477
  • 5
  • 57
  • 104