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

Re: Seems to be pushing more than necessary

From
Graham Hay <grahamrhay@gmail.com>
Date
Mar 23, 2015, 10:56 UTC
Message-ID
<CAABECY3xLHr1CWsezF6EjSWKkYpAW9VPFk31zznzn12_GVgAeA@mail.gmail.com>
In-Reply-To
<CACsJy8Cddt7S0NLcdz1ji_dDWUn_wCxie4+zxs5Akx1ObAvNEw@mail.gmail.com>

If I push straight to the other repo, it only pushes the 3 objects I'd expect (instead of 10,000+). So it looks like that is the problem, but I don't really understand why.

>From my point of view, there should be no difference, but I clearly

don't understand how it actually works. How does git decide what refs and/or objects are the same?

For a bit of background, the reason I have 2 remotes is to try and avoid pushing to master. We work in a highly regulated industry, and our code needs to be reviewed before hitting the mainline. So I push to my fork and create a PR to the blessed repo, that way if I accidentally commit to master (I have form!) then I have an extra chance to catch it and don't have to back it out.

The two repos started out the same though, the only differences should be the new work I have done. Is there any way I can continue to work like this, or do I have to choose between slow pushes and safety?

On 23 March 2015 at 10:41, Duy Nguyen <pclouds@gmail.com> wrote:
Show 18 quoted lines
> On Mon, Mar 23, 2015 at 5:35 PM, Graham Hay <grahamrhay@gmail.com> wrote:
>> Hmm. I'm using a "private" fork of a repo, I pull from one and push to
>> the other, e.g.
>>
>> git fetch foo
>> git rebase foo/master
>> git push --set-upstream origin bar
>>
>> It's quite possible my workflow is causing the problem, but I'm not
>> sure what I could do differently. What do you mean by a "no-share
>> remote"?
>
> I mean the refs (and associated objects) that are available on "foo"
> may be not available on "bar" so when you push to "origin" you just
> need to send more. That rebase could generate lots of new objects to
> push out too, I think.
> --
> Duy
Previous: Duy Nguyen
Message 17 of 17 in “Fwd: Seems to be pushing more than necessary”
  1. Graham HayMar 18, 2015
  2. Duy NguyenMar 18, 2015
  3. Graham HayMar 18, 2015
  4. Duy NguyenMar 18, 2015
  5. Graham HayMar 18, 2015
  6. Duy NguyenMar 18, 2015
  7. Duy NguyenMar 18, 2015
  8. Graham HayMar 18, 2015
  9. Duy NguyenMar 18, 2015
  10. Graham HayMar 18, 2015
  11. Duy NguyenMar 19, 2015
  12. Junio C HamanoMar 19, 2015
  13. Graham HayMar 20, 2015
  14. Duy NguyenMar 23, 2015
  15. Graham HayMar 23, 2015
  16. Duy NguyenMar 23, 2015
  17. Graham HayMar 23, 2015

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.