From: Geoff Russell <geoffrey.russell@gmail.com>
To: Johannes Sixt <j.sixt@viscovery.net>
Cc: git@vger.kernel.org
Subject: Re: Merging a branch when I don't want conflicts
Date: Mon, 18 May 2009 17:35:46 +0930 [thread overview]
Message-ID: <93c3eada0905180105n641614eodb0469dceca20bc9@mail.gmail.com> (raw)
In-Reply-To: <4A10FDC6.2040706@viscovery.net>
On 5/18/09, Johannes Sixt <j.sixt@viscovery.net> wrote:
> 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.
Yes.
>
> 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 file is data coming out of an interactive program which reads
the entire file, edits and then writes the entire file at which point
this file is correct
and all previous versions are obsolete. I don't really want a merge
at all, but just
want to replace the file in the master with the version on the branch.
Thanks anyway.
Cheers,
Geoff.
>
> The best you can do is perhaps to pipe conflicting files through
>
> sed -e '/^<<<<<<</,/^=======/d' -e '/^>>>>>>>/d'
>
> -- Hannes
>
>
--
6 Fifth Ave,
St Morris, S.A. 5068
Australia
Ph: 041 8805 184 / 08 8332 5069
next prev parent reply other threads:[~2009-05-18 8:05 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
2009-05-18 8:05 ` Geoff Russell [this message]
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=93c3eada0905180105n641614eodb0469dceca20bc9@mail.gmail.com \
--to=geoffrey.russell@gmail.com \
--cc=git@vger.kernel.org \
--cc=j.sixt@viscovery.net \
/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).