git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: walt <wa1ter@myrealbox.com>
Cc: git@vger.kernel.org
Subject: Re: git-merge: need a tap with the cluestick, please
Date: Thu, 18 Oct 2007 19:35:18 -0400	[thread overview]
Message-ID: <20071018233518.GL14735@spearce.org> (raw)
In-Reply-To: <ff80tr$hh1$1@ger.gmane.org>

walt <wa1ter@myrealbox.com> wrote:
> Now when I pull from Linus the merge stops in the middle because of
> conflicts with my .gitignore file <sigh>.  Anything I try now with
> git-merge tells me I can't do that in the middle of a conflicted
> merge.  Yes, I know that now, but what should I do instead?
> 
> I could move my 'obj' out-of-tree but then I wouldn't learn anything.
> This has to be bone-head easy, but not for me :)

How about putting the ignore for your obj dir in your own private
exclude file:

  $ echo /obj >>.git/info/exclude

will cause Git to ignore an "obj" directory if it is found in the
top level of the repository.  And since this file is not actually
tracked as part of the repository it will apply to all branches
in this repository and won't cause merge conflicts when upstream
makes changes to .gitignore.

As for aborting a merge that you have gotten into the middle of
decided you want to get out of, use `git reset --hard`.  That will
throw away all of the unmerged state and put you back to your
pre-merge state.

-- 
Shawn.

  reply	other threads:[~2007-10-18 23:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-18 16:17 git-merge: need a tap with the cluestick, please walt
2007-10-18 23:35 ` Shawn O. Pearce [this message]
2007-10-19  1:00   ` walt

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=20071018233518.GL14735@spearce.org \
    --to=spearce@spearce.org \
    --cc=git@vger.kernel.org \
    --cc=wa1ter@myrealbox.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).