Thread (7 messages) flat view 7 messages, 4 authors, 2016-06-15

Re: Merging a branch when I don't want conflicts

From: Nanako Shiraishi <hidden>
Date: 2016-06-15 22:46:47

Quoting Johannes Sixt [off-list ref]:
Geoff Russell schrieb:
quoted
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
I think -Xours enhancement that was developed long time ago

    http://thread.gmane.org/gmane.comp.version-control.git/76650/focus=89021

should help Geoff's use case.

-- 
Nanako Shiraishi
http://ivory.ap.teacup.com/nanako3/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help