threads / discuss / 29240

I can never finish a push

Subject: I can never finish a push

## tl;dr

5 messages between Dec 23, 2011 and Dec 23, 2011.

replies: 4people: 5as markdown or json

Martin L Resnick· Dec 23, 2011, 13:11 UTC · lore
I'm working remotely over a VERY slow line.

When I do a push it starts out fine but after the 15 seconds it takes to push it fails with non-fast-forward merge.

So I pull (no merge needed, its fast-forward) and try push again. Fails again.

I can keep this up for hours on end; pushing, pulling, pushing, pulling. Apparently there is fast and furious development on the branch I'm on that during my 15 seconds of pushing someone else on-site pushes and adds new commits before mine can finish.

Is there anyway to lock the repository while my push is going on ?

Please don't ask why I have a slow line or why the volume of changes that I am pushing. Suffice it to say its military work.

Thomas Rast· Dec 23, 2011, 14:18 UTC · re: Martin L Resnick · lore

Re: I can never finish a push

Martin L Resnick <mresnick@bbn.com> writes:
Show 18 quoted lines
> I'm working remotely over a VERY slow line.
>
> When I do a push it starts out fine
> but after the 15 seconds it takes to push
> it fails with non-fast-forward merge.
>
> So I pull (no merge needed, its fast-forward)
> and try push again. Fails again.
>
> I can keep this up for hours on end;
> pushing, pulling, pushing, pulling.
> Apparently there is fast and furious development
> on the branch I'm on that during my 15 seconds
> of pushing someone else on-site pushes and adds
> new commits before mine can finish.
>
> Is there anyway to lock the repository while
> my push is going on ?
Git doesn't have any locking features.

Your best bet is probably to have someone with faster access merge your branch, e.g., by pushing your work elsewhere (to another repo or just a different branch) and then sending them an email asking for your work to be merged.

If you have this issue a lot, the admins of your repo server could probably arrange for a feature where you push to a special "please merge this" branch namespace (such as incoming/martin-resnick), and the server then does the merge for you using locking (and of course refusing if there was any conflict).

However, it somewhat eludes me how you can generate churn on the order of 2000 commits (8*3600/15) per workday *to the same repository*. Perhaps the repository should be split into subprojects? Or at the very least, the subprojects should be handled in different repositories, from which an integrator pulls together the daily latest-and-greatest across all subprojects?

-- 
Thomas Rast
trast@{inf,student}.ethz.ch
demerphq· Dec 23, 2011, 14:19 UTC · re: Martin L Resnick · lore

Re: I can never finish a push

On 23 December 2011 14:11, Martin L Resnick <mresnick@bbn.com> wrote:
Show 22 quoted lines
> I'm working remotely over a VERY slow line.
>
> When I do a push it starts out fine
> but after the 15 seconds it takes to push
> it fails with non-fast-forward merge.
>
> So I pull (no merge needed, its fast-forward)
> and try push again. Fails again.
>
> I can keep this up for hours on end;
> pushing, pulling, pushing, pulling.
> Apparently there is fast and furious development
> on the branch I'm on that during my 15 seconds
> of pushing someone else on-site pushes and adds
> new commits before mine can finish.
>
> Is there anyway to lock the repository while
> my push is going on ?
>
> Please don't ask why I have a slow line
> or why the volume of changes that I am pushing.
> Suffice it to say its military work.

Maybe try pushing a branch and then having a colleague with a faster connection do the merge for you.

yves
-- 
perl -Mre=debug -e "/just|another|perl|hacker/"
Johannes Sixt· Dec 23, 2011, 14:39 UTC · re: Martin L Resnick · lore

Re: I can never finish a push

Am 12/23/2011 14:11, schrieb Martin L Resnick:
Show 11 quoted lines
> I'm working remotely over a VERY slow line.
> 
> When I do a push it starts out fine
> but after the 15 seconds it takes to push
> it fails with non-fast-forward merge.
> 
> So I pull (no merge needed, its fast-forward)
> and try push again. Fails again.
> 
> I can keep this up for hours on end;
> pushing, pulling, pushing, pulling.

Your statements can only make sense if the pushed branch generates a "non-fast-forward" is not the same branch that you pull. Show a transcript of your commands, and in particular also tell your setting of push.default.

-- Hannes
Andreas Schwab· Dec 23, 2011, 14:39 UTC · re: Martin L Resnick · lore

Re: I can never finish a push

Martin L Resnick <mresnick@bbn.com> writes:
> So I pull (no merge needed, its fast-forward)

If the merge is fast-forward then you aren't really having anything to push, are you? Are you sure you are pushing the right branch?

Andreas.
-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

← back to recent threads