$ ./guess_the_languageGit
Git · easy · #13

What does the merge do here?

$ git log --oneline --graph --all
* 259a50d (feat) B
* d24999e (HEAD -> main) A
$ git merge feat
  1. Copies B as a new commit on main
  2. Moves main forward to 259a50d
  3. Rebases feat onto main
  4. Creates a merge commit with two parents
main has no commits that feat lacks, so Git performs a fast-forward: it just moves the branch pointer. No merge commit is made.
Play Git ▸