Skip to contentSkip to conversation

I can never finish a push

DISCUSSION Martin L Resnick 5 participants 5 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

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.

#1 lore raw

Am 12/23/2011 14:11, schrieb Martin L Resnick:

Quoted 11 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

#2 lore raw
In reply to Martin L Resnick
Quoted 16 lines · Martin L Resnick

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.

Quoted 2 lines

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?

Signature · 2 lines
Thomas Rast
trast@{inf,student}.ethz.ch
#3 lore raw
In reply to Martin L Resnick
Quoted 16 lines · Martin L Resnick

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.

Quoted 6 lines

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

Signature · 1 line
perl -Mre=debug -e "/just|another|perl|hacker/"
#4 lore raw
In reply to Martin L Resnick
Quoted 1 line · Martin L Resnick

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.

Signature · 3 lines
Andreas Schwab, [email protected]
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."