Skip to content

Instantly share code, notes, and snippets.

@charterchap
Last active October 3, 2022 14:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save charterchap/3e3204901bb413cff6349698b65279f2 to your computer and use it in GitHub Desktop.
Save charterchap/3e3204901bb413cff6349698b65279f2 to your computer and use it in GitHub Desktop.
git config
[alias]
lg1 = 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(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
lg2 = 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(dim white)- %an%C(reset)' --all
lg = log --graph --oneline
br = branch -a --sort=-committerdate --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))'
permission-reset = !git diff -p -R --no-color | grep -E \"^(diff|(old|new) mode)\" --color=never | git apply
#[merge "verify"]
# name = merge and verify driver
# driver = ~/bin/merge_force_verify %A %O %B
[difftool "diffmerge"]
cmd = /usr/local/bin/diffmerge \"$LOCAL\" \"$REMOTE\"
[difftool "vscode"]
cmd = code --wait --diff $LOCAL $REMOTE
[mergetool "vscode"]
cmd = code --wait $MERGED
[mergetool "diffmerge"]
trustExitCode = true
cmd = /usr/local/bin/diffmerge --merge --result=\"$MERGED\" \"$LOCAL\" \"$BASE\" \"$REMOTE\"
[diff]
tool = vscode
[merge]
tool = vscode
[mergetool "diffmerge"]
trustExitCode = true
cmd = /usr/local/bin/diffmerge --merge --result=\"$MERGED\" \"$LOCAL\" \"$BASE\" \"$REMOTE\"
[core]
autocrlf = input
fileMode = false
[mergetool "sublimerge"]
cmd = subl -n --wait \"$REMOTE\" \"$BASE\" \"$LOCAL\" \"$MERGED\" --command \"sublimerge_diff_views\"
trustExitCode = false
[difftool "sublimerge"]
cmd = subl -n --wait \"$REMOTE\" \"$LOCAL\" --command \"sublimerge_diff_views {\\\"left_read_only\\\": false, \\\"right_read_only\\\": true}\"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment