From the Git Book:
“if the current branch has not diverged from the other–so every commit present in the current branch is already contained in the other–then git just performs a “fast forward”
I’m trying to reproduce this scenario, but this doesn’t produce any fast forwards:
$ git init
Initialized empty Git repository in /work/fun/git_experiments/.git/
$ echo initial > readme && git add readme && git commit -a -m Created
[master (root-commit) 74495b9] Created
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 readme
$ git branch b1
$ echo modified > readme && git commit -a -m "Modified"
[master d40d5fb] Modified
1 files changed, 1 insertions(+), 1 deletions(-)
$ git checkout b1
Switched to branch 'b1'
$ echo modified > readme && git commit -a -m "Modified"
[ b1 46fd337] Modified
1 files changed, 1 insertions(+), 1 deletions(-)
$ git merge master
Merge made by recursive.
$
Because although the content of the two commits are the same, they are not actually the same commit (N.B.: one is commit ID
d40d5fband the other is46fd337). Thus, branchb1contains a commit not inmaster, so not all of the commits inb1are a descendant ofmaster.