3
$git pull

remote: Counting objects: 12, done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 12 (delta 2), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (12/12), done.
From https://git.xxx.net/xxx/xxx
   e6a2fdc..eb88a8f  B03379     -> origin/B03379
   e4cd081..7d5d84d  B03405     -> origin/B03405
Already up-to-date.

Does it mean the files in the current directory before running git pull are already up-to-date?

If yes, why does it have that part besides "Already up-to-date"?

What does the part of the output except "Already up-to-date" mean?

Thanks.

Tim
  • 1
  • 141
  • 372
  • 590

2 Answers2

6

A short answer is that git pull is actually running git fetch, then git merge, and the output you're seeing is related to those commands.

This is the git fetch portion:

remote: Counting objects: 12, done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 12 (delta 2), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (12/12), done.

What this does is count up all of your remotes (trees, tags, commits, basically things that you need to fetch before you can merge), then unpack them.

From https://git.xxx.net/xxx/xxx
   e6a2fdc..eb88a8f  B03379     -> origin/B03379
   e4cd081..7d5d84d  B03405     -> origin/B03405

Paraphrasing another answer to this question, this part means that you've fetched the branch 'B03379' from the given remote; the ref origin/B03379 now points to it.

Already up-to-date.

Now git moves onto merge and finds that your branch is already up to date, and no merge needs to be performed. Therefore, it outputs the familiar message, 'Already up-to-date.'

Check out this question for more info and a better explanation than I could give: What does the output of git pull actually mean?

Community
  • 1
  • 1
R. McManaman
  • 304
  • 2
  • 14
3

Already up-to-date.

It means the current checked out branch is already up-to-date with upstream.
So there is nothing to merge.

What precedes that is the git fetch part of git pull.

Since git pull is git fetch + git merge, what you see is the fetch part.
Two remote tracking branches are updated.
But your current branch is not, because its own upstream remote tracking branch was not updated (no new commits fetched from the remote repo origin)

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks. Do you mean that git updates some other branches because of change on them, while doesn't update the current branch because of no change on the branch? – Tim Mar 16 '17 at 22:35
  • @Tim Exactly: the fetch part fetches commits from *all* branches of origin: two of them has new commits, your current branch had no new commits. – VonC Mar 16 '17 at 22:36