All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: geoffrey.russell@gmail.com
Cc: git@vger.kernel.org
Subject: Re: Merging a branch when I don't want conflicts
Date: Mon, 18 May 2009 08:18:46 +0200	[thread overview]
Message-ID: <4A10FDC6.2040706@viscovery.net> (raw)
In-Reply-To: <93c3eada0905171930m36765d4fued9c2efdc57e51a4@mail.gmail.com>

Geoff Russell schrieb:
> How do I merge a branch X into my master and tell git that whenever there
> is a conflict, the file on X should prevail?  This is for a scripted
> application.

I assume you talk about file-level (content) merges.

There is no such tool, and the reason is that what you try to do here does
not make sense *in general*. It must be a very special kind of project
where you can blindly trust one side over the other if there are
conflicts, and that you can additionally trust non-conflicting content merges.

The best you can do is perhaps to pipe conflicting files through

    sed -e '/^<<<<<<</,/^=======/d' -e '/^>>>>>>>/d'

-- Hannes

  reply	other threads:[~2009-05-18  6:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-18  2:30 Merging a branch when I don't want conflicts Geoff Russell
2009-05-18  6:18 ` Johannes Sixt [this message]
2009-05-18  8:05   ` Geoff Russell
2009-05-18  9:01     ` Johannes Sixt
2009-05-18 23:53       ` Geoff Russell
2009-05-18 10:45   ` Nanako Shiraishi
2009-05-18 15:57     ` Tay Ray Chuan
2009-05-18 16:17       ` 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=4A10FDC6.2040706@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=geoffrey.russell@gmail.com \
    --cc=git@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.