git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Strange large push operation.

From
Sitaram Chamarty <sitaramc@gmail.com>
Date
Dec 26, 2008, 14:48 UTC
Message-ID
<slrngl9rmf.r7h.sitaramc@sitaramc.homelinux.net>
In-Reply-To
<4954CCD6.5000105@daysofwonder.com>
On 2008-12-26, Brice Figureau <brice+git@daysofwonder.com> wrote:
> Then I wanted to push this newbranch as a remote branch with:
> $ git push origin newbranch:refs/heads/newbranch
I'd have just said "git push origin newbranch" :-)
Show 5 quoted lines
> and obtained the following output:
> Counting objects: 12767, done.
> Compressing objects: 100% (3816/3816), done.
> writing objects:   8% (935/11682), 2.40 MiB | 324 KiB/s
> ^C
> I stopped the push because I don't get why there are so much objects to 
> send while the diff between newbranch and branch is only 5 small commits 
>   (and it obviously wants to push a large part of the history).

Yes but you didn't actually say that the master has "branch" -- perhaps it isn't as uptodate as you thought it was...? Or perhaps there was a rebase or something that changed a *lot* of stuff.

Try "git log -n 1 branch" on both machines to see if they point to the same hash.

[Additionally, I'm not really sure if that progress is a worst case estimate or a real estimate...]

> Is there a way to check what objects are sent to origin and why?

My all-time favourite git command is "bundle" [which should tell you I work a lot with disconnected repos!]

Try "git bundle create /tmp/temp.bdl branch..newbranch" then see how big that temp file is. That'll be about what goes to the other side (assuming the other side has the same hash for "branch").

You could even take it to the other side and do the
following:
    git ls-remote temp.bdl  # shows refs in bundle
    git fetch temp.bdl one-of-the-refs-in-the-bundle
    git merge FETCH_HEAD # merge it into current branch
> What could be the cause of the issue?
can't say.  Try the following commands also to get a birds
eye view of the various branches on both sides
    git fetch   # update your idea of what's on remote
    git branch -a -v
I also like
    git log --graph --pretty=oneline --abbrev-commit --decorate --all
which I've aliased to "lg"
> (and found 5 unreachables objects in the local one, should I care?). I 
Nope.  Lots of reasons to have unreachable objects...
Previous: Brice Figureau
Message 2 of 2 in “Strange large push operation.”
  1. Brice FigureauDec 26, 2008
  2. Sitaram ChamartyDec 26, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.