Re: Improving merge of tricky conflicts
- From
Sergey Organov <sorganov@gmail.com>
- Date
- Jul 23, 2020, 19:11 UTC
- Message-ID
- <87blk6yrlc.fsf@osv.gnss.ru>
- In-Reply-To
- <20200723182648.GC3975154@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 19 quoted lines
> On Thu, Jul 23, 2020 at 12:20:46AM +0300, Sergey Organov wrote: > >> >> Is there 'git merge' command-line option for that? I failed to find one. >> > >> > There isn't, unless you count >> > >> > $ git -c merge.conflictstyle=diff3 merge side-branch >> > >> > as a "command line option" (which may technically is). >> >> Yeah, I thought of maybe making an alias for that, so apparently I do >> count it as command line option, thanks! > > You can also do it after "git merge" aborts with conflicts by running: > > git checkout --conflict=diff3 my-file > > but do note that it will check out from the index, overwriting any > resolution you've already done in that file.
Really nice trick, thanks for sharing!
Though now it gets really odd "git merge" itself doesn't have this option.
-- Sergey