Re: Merging a branch when I don't want conflicts
- From
Geoff Russell <geoffrey.russell@gmail.com>
- Date
- May 18, 2009, 08:05 UTC
- Message-ID
- <93c3eada0905180105n641614eodb0469dceca20bc9@mail.gmail.com>
- In-Reply-To
- <4A10FDC6.2040706@viscovery.net>
On 5/18/09, Johannes Sixt <j.sixt@viscovery.net> wrote:
Show 8 quoted lines
> 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.
Show 5 quoted lines
> > 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.
Show 8 quoted lines
> > 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