onlywei / explain-git-with-d3

Use D3 to visualize simple git branching operations.
MIT License
1.71k stars 390 forks source link

`git merge` on up-to-date branch generates a bogus commit #7

Open changemewtf opened 10 years ago

changemewtf commented 10 years ago

To reproduce:

  1. Open the git commit example
  2. Run git checkout -b newbranch
  3. Run git commit
  4. Run git merge master

Expected Results: "Already up-to-date".

Actual Results: It generates a weird franken-commit:

Weird merge behavior

This also happens with git rebase origin/master on the Update Private Local Branch with Latest from Origin example:

Weird rebase behavior

In this instance, my-branch originally pointed at dccdc4d..., and the git rebase origin/master command created two new commits even though my-branch was already up-to-date.