Re: How to ignore changes on remote

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

 



Why would we teach someone to do that instead of just recommending the
far less obscure 'git push -f'?  A leading '+' on the refspec is
ridiculously confusing compared to "just tell it to force the push
with -f".  Am I forgetting something?

Also, Howard, what do you mean by "I forgot to merge"?  Do other
people have push access to this branch?  You can't just tell people
"use the local version" after you force a push.  If anyone has based
work off of that point, you're going to get into way more trouble
forcing a non-ff push than if you just did a merge and then resolved
all the conflicts as --ours.

Scott

On Tue, Mar 23, 2010 at 7:25 AM, Sylvain Rabot <sylvain@xxxxxxxxxxxxxx> wrote:
> On Tue, 2010-03-23 at 14:13 +0000, Howard Miller wrote:
>> >
>> > git push origin +local_branch:remote_branch
>> >
>>
>> Thanks!
>>
>> Tell me more about that '+'. I've never heard of it before. Can't see
>> anything in the docs (although I'm probably not looking in the right
>> place)
>
> http://kernel.org/pub/software/scm/git/docs/git-push.html
>
> the '+' means that you want to bypass the security which does not allow
> non fast-forward pushes.
>
> Note that you shouldn't do non fast-forward pushes to a repository which
> can be cloned by other people than you. Once published (accessible to
> anybody) you should do a merge and then push to origin even if you only
> take your local history in the merge to avoid user pulling from origin
> conflicts due to the non fast forward history.
>
> Regards.
>
> --
> Sylvain Rabot <sylvain@xxxxxxxxxxxxxx>
>
--
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]