git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Bill Priest <priestwilliaml@yahoo.com>
Cc: git@vger.kernel.org
Subject: Re: git-merge ignore specific files
Date: Tue, 6 Nov 2007 14:46:35 +0100	[thread overview]
Message-ID: <200711061446.36336.jnareb@gmail.com> (raw)
In-Reply-To: <323303.75335.qm@web55010.mail.re4.yahoo.com>

Bill Priest wrote:
> Jakub Narebski <jnareb@gmail.com> wrote:
>> Bill Priest wrote:
>> 
>>> All,
>>>   I have two branches that are slightly different and
>>> most changes "belong" in both.  There are a handful of
>>> files/directories that are disparate.  Is there any
>>> way in git to tell it not to merge these files? Kind
>>> of like .gitignore but for merges.
>> 
>> Most probably you can use gitattributes for that.
>> Or you can use 'our' merge strategy.
> 
> Can you point me to some docs on "our" merge strategy?

git-merge(1), section "Merge strategies":

  ours::
        This resolves any number of heads, but the result of the
        merge is always the current branch head.  It is meant to
        be used to supersede old development history of side
        branches.

>>>   In addition I'd like a way to specify to git-merge
>>> to leave all merged files unrecorded in the index.
>>> Then as I go through each file making sure that the
>>> merge "makes sense" (not that git did the right thing;
>>> but that I want the changes in both branches) that
>>> I add the change to the index.
>> 
>> You can use gitattributes for that.
> 
> I did man gitattributes and nothing jumped out at me
> as far as an attribute that I could set/unset that
> would stop a file from being merged.  What am I
> missing?

See `diff' and `merge' attributes, for example

*.nbi		-diff -merge

-- 
Jakub Narebski
Poland

      reply	other threads:[~2007-11-06 13:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-06 12:38 git-merge ignore specific files Bill Priest
2007-11-06 12:53 ` Andreas Ericsson
2007-11-06 13:03 ` Jakub Narebski
2007-11-06 13:15   ` Bill Priest
2007-11-06 13:46     ` Jakub Narebski [this message]

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=200711061446.36336.jnareb@gmail.com \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=priestwilliaml@yahoo.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).