git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Howard Miller <howard@e-learndesign.co.uk>
To: "Björn Steinbrink" <B.Steinbrink@gmx.de>
Cc: Martin Langhoff <martin.langhoff@gmail.com>, git@vger.kernel.org
Subject: Re: Commited to wrong branch
Date: Tue, 15 Sep 2009 21:52:10 +0100	[thread overview]
Message-ID: <26ae428a0909151352v1cc27b6dw1d77ac6dda0411ff@mail.gmail.com> (raw)
In-Reply-To: <20090915203948.GA14652@atjola.homenet>

I don't imagine having a problem with conflict markers although I've
never had any in a git related project (yet!). I'm in the happy
position of working by myself at the moment which, in the end, is how
I got out of my problem because I knew where all the changes where.
Interestingly, the whole .rej file thing IS new to me. I've been using
patch files for years and have never had that happen before. Hmmm...

Never used emacs either - I'm a Vim-kid :-)

Martin's point about simply copying the repo so you have a backup is
at the same time dead simple and brilliant. It's almost an undo. I
have an idea that I could now fumble my way through a problem like
this. The bother is that git has too many commands and too little
(idiot proof) help which is a shame. Not everybody is a power user -
but we are just the sort of people who mess up. I'm trying to put a
positive spin on things - we need a git tips wiki or something.
Version control to me is a dull necessity - I don't want to have to
think about it!

Howard

2009/9/15 Björn Steinbrink <B.Steinbrink@gmx.de>:
> On 2009.09.15 15:54:58 +0200, Martin Langhoff wrote:
>> 2009/9/15 Björn Steinbrink <B.Steinbrink@gmx.de>:
>> > Just don't use patch(1), there's no sane reason to do that, you're
>> > sacrificing all of what git can offer there.
>>
>> Oh, yes there is, specially for newcomers used to patch, and how it
>> handles conflicts.
>
> Sooner or later you'll hit a merge conflict anyway, and conflict markers
> aren't that hard to understand, and IMHO are easier to handle than .rej
> files, as you get to edit everything in-place.
>
>> In this case, I happen to know that Howard is a refugee from CVS land
>> (the moodle project in this case), and he is familiar with the output
>> of patch if things go wrong.
>
> Uhm, CVS uses the same conflict markers that git uses.
>
>> It's not what I'd recommend to someone that is deep in git-land. But
>> even myself (with a bit of code in git) sometimes use patch when
>> git-apply tries to be too clever and I just want a damn .rej file to
>> review and edit with emacs.
>
> Well, you likely shouldn't be using git-apply, which is plumbing, and
> can't easily make use of the "index" information in git patches to do a
> three-way merge instead of a "stupid" patch application. Instead use
> git-am --3way to make git perform a three-way merge, leading to
> conflicts instead of plain patch rejection.
>
> And in a case like Howard's, in which nothing is coming from outside the
> repo, there's not even any reason to use am. It's already all in there,
> so "checkout -m", "stash/stash apply" (uncommitted changes) and
> "cherry-pick", "rebase [-i]" are way better than manually dealing with
> format-patch + am or even apply.
>
> Björn
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

  reply	other threads:[~2009-09-15 20:52 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-15 10:31 Commited to wrong branch Howard Miller
2009-09-15 10:55 ` Martin Langhoff
2009-09-15 11:05   ` Howard Miller
2009-09-15 11:16     ` Martin Langhoff
2009-09-15 12:10       ` Howard Miller
2009-09-15 12:46         ` Martin Langhoff
2009-09-15 12:58           ` Howard Miller
2009-09-15 13:06             ` Björn Steinbrink
2009-09-15 13:12               ` Howard Miller
2009-09-15 13:54               ` Martin Langhoff
2009-09-15 14:11                 ` Howard Miller
2009-09-15 20:39                 ` Björn Steinbrink
2009-09-15 20:52                   ` Howard Miller [this message]
2009-09-15 21:53                   ` Martin Langhoff
2009-09-15 22:30                     ` Björn Steinbrink
2009-09-15 13:27             ` Howard Miller
2009-09-15 13:45               ` Howard Miller
2009-09-15 14:08                 ` Johannes Sixt
2009-09-15 13:46               ` Martin Langhoff
2009-09-15 11:19   ` Björn Steinbrink

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=26ae428a0909151352v1cc27b6dw1d77ac6dda0411ff@mail.gmail.com \
    --to=howard@e-learndesign.co.uk \
    --cc=B.Steinbrink@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=martin.langhoff@gmail.com \
    /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).