Skip to content

Instantly share code, notes, and snippets.

@chadly
Last active August 26, 2024 17:43
Setup global git configuration with Beyond Compare 4 and WSL2
[core]
editor = code --wait
[user]
name = Chad Lee
email = git@chadly.net
[pull]
rebase = true
[push]
default = upstream
autoSetupRemote = true
[fetch]
prune = true
[alias]
lg = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
ac = !git add -A && sgc
ca = commit -a --amend --no-edit
home = !git stash -u && git checkout master && git fetch --prune && git pull
fresh = !git home && git clean -dfx
[credential]
helper = store
[diff]
tool = bc
[difftool]
prompt = false
[difftool "vscode"]
cmd = code --wait --diff $LOCAL $REMOTE
[difftool "bc"]
trustExitCode = true
path = /mnt/c/Program Files/Beyond Compare 4/bcomp.exe
cmd=/mnt/c/Program\\ Files/Beyond\\ Compare\\ 4/bcomp.exe "$(wslpath -aw $LOCAL)" "$(wslpath -aw $REMOTE)"
[merge]
tool = bc
[mergetool "bc"]
trustExitCode = true
path = /mnt/c/Program Files/Beyond Compare 4/bcomp.exe
cmd=/mnt/c/Program\\ Files/Beyond\\ Compare\\ 4/bcomp.exe "$(wslpath -aw $LOCAL)" "$(wslpath -aw $REMOTE)" "$(wslpath -aw $BASE)" "$(wslpath -aw $MERGED)"
[mergetool]
keepBackup = false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment