git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Scott Chacon <schacon@gmail.com>
To: sylvain@abstraction.fr
Cc: git@vger.kernel.org, howard@e-learndesign.co.uk
Subject: Re: How to ignore changes on remote
Date: Tue, 23 Mar 2010 09:05:41 -0700	[thread overview]
Message-ID: <d411cc4a1003230905y12839743x400333a0aa2e7018@mail.gmail.com> (raw)
In-Reply-To: <1269354326.14299.7.camel@kheops>

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@abstraction.fr> 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@abstraction.fr>
>

  reply	other threads:[~2010-03-23 16:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-23 13:54 How to ignore changes on remote Howard Miller
2010-03-23 14:07 ` Sylvain Rabot
2010-03-23 14:13   ` Howard Miller
2010-03-23 14:21     ` Alexander Iljin
2010-03-23 14:22     ` Santi Béjar
2010-03-23 14:24       ` Howard Miller
2010-03-23 14:25     ` Sylvain Rabot
2010-03-23 16:05       ` Scott Chacon [this message]
2010-03-23 16:13         ` Howard Miller
2010-03-23 16:20         ` Johannes Sixt
2010-03-23 17:20           ` Johan Herland
2010-03-23 17:47             ` Jakub Narebski
2010-03-23 18:02               ` Johan Herland
2010-03-23 16:44         ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d411cc4a1003230905y12839743x400333a0aa2e7018@mail.gmail.com \
    --to=schacon@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=howard@e-learndesign.co.uk \
    --cc=sylvain@abstraction.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).