Skip to content

Instantly share code, notes, and snippets.

@bastelflp
Forked from shawndumas/.gitconfig
Last active February 1, 2023 09:49
Show Gist options
  • Save bastelflp/9054a3d25a2e846941f4 to your computer and use it in GitHub Desktop.
Save bastelflp/9054a3d25a2e846941f4 to your computer and use it in GitHub Desktop.
Using WinMerge as the git Diff/Merge Tool and Notepad++ for commit messages on Windows 64bit
[mergetool]
prompt = false
keepBackup = false
keepTemporaries = false
[merge]
tool = winmerge
[mergetool "winmerge"]
name = WinMerge
trustExitCode = true
cmd = "/c/Program\\ Files\\ \\(x86\\)/WinMerge/WinMergeU.exe" -u -e -dl \"Local\" -dr \"Remote\" $LOCAL $REMOTE $MERGED
[diff]
tool = winmerge
[difftool "winmerge"]
name = WinMerge
trustExitCode = true
cmd = "/c/Program\\ Files\\ \\(x86\\)/WinMerge/WinMergeU.exe" -u -e $LOCAL $REMOTE
[core]
editor = "/C/Program\\ Files\\ \\(x86\\)/Notepad++/notepad++.exe" -multiInst -notabbar -nosession -noPlugin
[alias]
# modified from http://stackoverflow.com/a/34467298
lg = !"git lg1"
lg1 = !"git lg1-specific --all"
lg2 = !"git lg2-specific --all"
lg3 = !"git lg3-specific --all"
lg1-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(magenta)<%an>%C(reset)%C(yellow)%d%C(reset)'
lg2-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold Cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold Yellow)%d%C(reset)%n'' %C(White)%s%C(reset) %C(magenta)<%an>%C(reset)'
lg3-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold Cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset) %C(bold Cyan)(committed: %cD)%C(reset) %C(bold Yellow)%d%C(reset)%n'' %C(white)%s%C(reset)%n'' %C(magenta)%an <%ae> %C(reset) %C(magenta)(committer: %cn <%ce>)%C(reset)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment