What does Fast-forward mean when pulling from remote?

abg picture abg · Apr 17, 2014 · Viewed 12.1k times · Source

I run git pull twice and get the following out:

$ git pull
remote: Counting objects: 1, done.
remote: Total 1 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (1/1), done.
From git.assembla.com:my-project
   da3f54c..bb335a4  master     -> origin/master
Updating 5934c67..bb335a4
Fast-forward

$ git pull
Already up-to-date.

How to understand this output?

Answer

SzG picture SzG · Apr 17, 2014

You've pulled the remote origin/master branch into your local master branch.
The two branches have not diverged, there were just some new commits on origin/master.
So your local master was fast-forwarded to origin/master without any merge.

Git branches are lightweight, they are just moving labels, pointing to certain commits.