1

git graph

As you can see in the image, feature branch number 668 has been merged into dev branch. But why the git graph appears like dev branch was merged into branch number 668 instead?

This behavior seems to happen only when do a merge request from GitLab.com. It does not happen when manually merge in a local machine.

Thanks!

EDIT: Added git graph from GitLab.com enter image description here

This is my GitLab merge request setting: enter image description here

Preeti Y.
  • 429
  • 4
  • 11
  • did you run `git pull origin develop` to sync the branch? – TheGeorgeous Nov 05 '20 at 05:04
  • @TheGeorgeous Yes, I already did. – Preeti Y. Nov 05 '20 at 06:55
  • That's why you have the merge from develop to your branch. If you don't want merge commits when you pull, you can either add `--rebase` when you pull or set `pull.rebase` to true in your gitconfig – TheGeorgeous Nov 05 '20 at 07:04
  • @TheGeorgeous Thanks for the quick reply. I think it happened before I was pulled `dev` branch in my local machine. As you can see in my new screenshot above which is on GitLab.com so it is not related with my machine, so maybe it is the GitLab's behavior? – Preeti Y. Nov 05 '20 at 07:15

2 Answers2

1

There is something fishy with the two successive merge commits merge branch dev into 668-* and merge branch 668-* into dev.

Try running :

# you don't need the full history : '-5' will limit the log view to 5 commits
git log --oneline --graph -5 dev

You should see a sequence of commits and merge, where at some point dev was fast forwarded to 668-*.

LeGEC
  • 46,477
  • 5
  • 57
  • 104
0

Just want to update to everyone. After a certain amount of time, everything is back as it should be. I don't know what happened too.

Preeti Y.
  • 429
  • 4
  • 11