Git Question

51 views
Skip to first unread message

David Gerber

unread,
Jun 20, 2012, 1:43:36 PM6/20/12
to git-...@googlegroups.com
Can anyone kind of go through each of these lines and describe what is happening here.  Very interested 
to know more details on this git pull.

Thanks

remote: Counting objects: 248, done.
remote: Compressing objects: 100% (70/70), done.
remote: Total 140 (delta 104), reused 101 (delta 70)
Receiving objects: 100% (140/140), 38.50 KiB, done.
Resolving deltas: 100% (104/104), completed with 46 local objects.
From github.com:honest/www
   7ed59c6..279f322  develop    -> origin/develop
   ed1ef45..6859453  staging    -> origin/staging
From github.com:site/www
 * [new tag]         1.10rc1    -> 1.10rc1
 * [new tag]         1.10rc2    -> 1.10rc2
Updating 7ed59c6..279f322
Fast-forward
 app/controllers/account/credit_cards_controller.rb |   25 +++++++++++++
 db/schema.rb                                       |    2 +-
 public/images/wrapper/banner2.png                  |  Bin 6958 -> 14332 bytes
 19 files changed, 112 insertions(+), 53 deletions(-)
 create mode 100644 db/migrate/20120619231550_populate_addressable_columns_for_billing_addresses.rb

Thomas Ferris Nicolaisen

unread,
Jun 21, 2012, 4:35:55 AM6/21/12
to git-...@googlegroups.com
On Wednesday, June 20, 2012 7:43:36 PM UTC+2, David Gerber wrote:
Can anyone kind of go through each of these lines and describe what is happening here.  Very interested 
to know more details on this git pull.

A great question! I have to admit I stopped looking too closely at this output a long while ago, all the more reason to try explaining it properly now :)
 
remote: Counting objects: 248, done.

Any message prefixed with "remote:" means it's coming from the remote repository. 

The first thing it does it to count the number of objects in the repository that will have to be transferred: commits, blobs, trees and tags. 248 is the number of objects missing in your local repository, I believe.

If you want to find out more about these objects, try playing around with git count-objects -v in your repositories, before and after committing. 

Note that the object count differs between "loose" objects, and objects that have been compressed into "pack files" (think of it as zip files) for efficiency.
 
remote: Compressing objects: 100% (70/70), done.

This is the remote compressing loose objects before transfer. I reckon 70 is the number of loose objects that need to be transferred.
 
remote: Total 140 (delta 104), reused 101 (delta 70)

Now here I'm getting a bit unsure. Git does a lot of optimization on making the transfer as fast as possible. Some of the compressions it has done are delta-compressed, and I reckon that's what those delta objects are. I think reused means the contents that were already compressed into pack files on the remote side. Closest thing I could find to an explanation is here
 
Receiving objects: 100% (140/140), 38.50 KiB, done.

This is just a progress counter during the transfer across the wire. The final 38.50 is the number of Kikibytes (analog to Kilobytes) that was transferred.
 
Resolving deltas: 100% (104/104), completed with 46 local objects.

Just the receiving end confirming the deltas mentioned above.
 
From github.com:honest/www
   7ed59c6..279f322  develop    -> origin/develop
   ed1ef45..6859453  staging    -> origin/staging

This means that two remote branches (develop and staging) had changes, and that your remote branches have been updated with these changes (not your local branches).
 
From github.com:site/www
 * [new tag]         1.10rc1    -> 1.10rc1
 * [new tag]         1.10rc2    -> 1.10rc2

And two new tags were discovered. 

Updating 7ed59c6..279f322

This is your current active branch (develop) being updated with the changes we saw earlier. Since you are pulling, and not simply fetching, the changes from the remote branch are being merged into your local branch (because your local branch 'develop' is set up to track the remote branch 'origin/develop').
 
Fast-forward

This means that your local branch has not diverged from origin/develop. In other words: you haven't made any local commits. The merge can therefore be fast-forwarded, playing the changes onto your local branch without doing a merge commit.
 
 app/controllers/account/credit_cards_controller.rb |   25 +++++++++++++
 db/schema.rb                                       |    2 +-

These are the changes in "stat" form (the same as doing git diff --stat 7ed59c6..279f322)
 
 public/images/wrapper/banner2.png                  |  Bin 6958 -> 14332 bytes

Change in a binary file, cannot be expressed as line changes, so the change in size is printed instead.
 
 19 files changed, 112 insertions(+), 53 deletions(-)

A summary of the changes that were made in your current branch.
 
 create mode 100644 db/migrate/20120619231550_populate_addressable_columns_for_billing_addresses.rb

This is a notice on which of the changes files are actually new files.

I'd love if anyone else can elaborate even more on any of these, especially the number of objects being transferred.

Konstantin Khomoutov

unread,
Jun 21, 2012, 1:47:31 PM6/21/12
to git-...@googlegroups.com, Thomas Ferris Nicolaisen
On Thu, 21 Jun 2012 01:35:55 -0700 (PDT)
Thomas Ferris Nicolaisen <tfn...@gmail.com> wrote:

[...]

> > From github.com:honest/www
> > 7ed59c6..279f322 develop -> origin/develop
> > ed1ef45..6859453 staging -> origin/staging
>
> This means that two remote branches (develop and staging) had
> changes, and that your *remote* branches have been updated with these
> changes (not your local branches).

More to read on the distinction about the confusing naming of branches
can be found in [1].

> > From github.com:site/www
> > * [new tag] 1.10rc1 -> 1.10rc1
> > * [new tag] 1.10rc2 -> 1.10rc2
>
> And two new tags were discovered.

Worth mentioning that only the tags attached to objects which are
referenced (directly or indirectly) by the head(s) being fetched (`git
pull` calls `git fetch` first) are downloaded by default.
To get all the tags from the remote one can use `git fetch --tags ...`.

[...]

1. http://www.gitguys.com/topics/tracking-branches-and-remote-tracking-branches/
Reply all
Reply to author
Forward
0 new messages