Re: Master and origin/master diverged

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Neal,

On 22 June 2012 12:01, Neal Kreitzinger <nkreitzinger@xxxxxxxxx> wrote:
> On 6/22/2012 12:53 PM, Hilco Wijbenga wrote:
>>
>> Hi all,
>>
>> One of my developers managed to push something that somehow "diverged"
>> origin/master from everyone else's local master.
>>
>> A --> B --> C --> D (everybody's local master)
>> |
>> \--> B' --> C' --> D' --> E (origin/master)
>>
>> (i.e., A is the commit where things diverged; everyone's local master
>> points to D but the new commit (E) that was pushed to origin/master
>> uses different SHA1s for B, C, and D). I hope I explained it clearly
>> enough.
>>
>> Now running git pull creates a merge commit joining D and E.
>>
>> When I asked the developer what he had done he told me everything had
>> looked normal. No Git warnings, nothing strange in gitk (i.e. normal
>> linear history). So I do not understand what went wrong.
>>
>> Does anyone have any idea as to what might have happened? Perhaps if I
>> understand how this happened I might be able to prevent it from
>> happening again.
>>
> Some ways you can prevent it from happening again:
> (1) setting your canonical repo config to deny non-ff, and deny deletes:
> [receive]
>        denyDeletes = true
>        denyNonFastforwards = true

I would *really* like to do that but I need access to the server for
that, right? Unfortunately, we use Unfuddle and that means no such
access. So no server config changes and no Git hooks.

> (2) have your devs do git pull --ff-only

Is this something that can be set in git config? I looked but didn't
see anything obvious. Actually, I guess what I really want is
something for git push, right?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]