Switch merge layout.

This commit is contained in:
cyteen 2026-03-11 02:03:19 +00:00
parent 36fc1ebba0
commit a54130cb7c
1 changed files with 9 additions and 3 deletions

View File

@ -1,4 +1,8 @@
#!/usr/bin/env bash
# Concepts for resolving Git conflicts
# https://gist.github.com/karenyyng/f19ff75c60f18b4b8149
BIN_DIR=/usr/local/bin
#BIN_DIR=~/bin
@ -15,9 +19,11 @@ git difftool --tool-help
TOOL_PATH=nvim
DIFF_TOOL=nvimdiff # terminal diff/merge tool
MERGE_TOOL=nvimdiff
DIFF_STYLE="LOCAL,MERGED,REMOTE"
# DIFF_STYLE="LOCAL,MERGED,REMOTE"
DIFF_STYLE="LOCAL,BASE,REMOTE / MERGED"
mergetool.nvimdiff.layout 2
git config --global merge.tool ${DIFF_TOOL}
git config --global mergetool.${DIFF_TOOL}.layout "${DIFF_STYLE}"
# $LOCAL is the file in the current branch (e.g. master).
# $REMOTE is the file in the branch being merged (e.g. branch_name).
@ -41,7 +47,7 @@ git config --global difftool.${DIFF_TOOL}.path "${TOOL_PATH}"
git config merge.tool ${MERGE_TOOL}
git config --global merge.tool ${MERGE_TOOL}
git config merge.layout ${DIFF_STYLE}
git config merge.layout "${DIFF_STYLE}"
git config --global mergetool.${MERGE_TOOL}.layout "${DIFF_STYLE}"
git config --global mergetool.${MERGE_TOOL}.path ${TOOL_PATH}