# I can never finish a push

5 messages from 2011-12-23 to 2011-12-23. Participants: Martin L Resnick, Thomas Rast, demerphq, Johannes Sixt, Andreas Schwab.
Thread: https://gitlist.dev/t/29240

## Martin L Resnick, 2011-12-23 13:11

Subject: I can never finish a push
Message-ID: <4EF47DF3.9080809@bbn.com>
URL: https://gitlist.dev/e/4EF47DF3.9080809%40bbn.com

```
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, 2011-12-23 14:18

Subject: Re: I can never finish a push
Message-ID: <87liq3l6bl.fsf@thomas.inf.ethz.ch>
URL: https://gitlist.dev/e/87liq3l6bl.fsf%40thomas.inf.ethz.ch
In-Reply-To: <4EF47DF3.9080809@bbn.com>

```
Martin L Resnick <mresnick@bbn.com> writes:

> 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, 2011-12-23 14:19

Subject: Re: I can never finish a push
Message-ID: <CANgJU+VEpYkttoBp0SUNcROH6-HmGX5v7aVXGZFO_U2aZHv8mA@mail.gmail.com>
URL: https://gitlist.dev/e/CANgJU%2BVEpYkttoBp0SUNcROH6-HmGX5v7aVXGZFO_U2aZHv8mA%40mail.gmail.com
In-Reply-To: <4EF47DF3.9080809@bbn.com>

```
On 23 December 2011 14:11, Martin L Resnick <mresnick@bbn.com> wrote:
> 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, 2011-12-23 14:39

Subject: Re: I can never finish a push
Message-ID: <4EF4928E.4090306@viscovery.net>
URL: https://gitlist.dev/e/4EF4928E.4090306%40viscovery.net
In-Reply-To: <4EF47DF3.9080809@bbn.com>

```
Am 12/23/2011 14:11, schrieb 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.

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, 2011-12-23 14:39

Subject: Re: I can never finish a push
Message-ID: <m262h773nz.fsf@igel.home>
URL: https://gitlist.dev/e/m262h773nz.fsf%40igel.home
In-Reply-To: <4EF47DF3.9080809@bbn.com>

```
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."

```
