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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]