Skip to content

Instantly share code, notes, and snippets.

@NicHub

NicHub/gitconfig Secret

Last active November 22, 2023 07:47
Show Gist options
  • Save NicHub/df87a397567afa9d9107 to your computer and use it in GitHub Desktop.
Save NicHub/df87a397567afa9d9107 to your computer and use it in GitHub Desktop.
# Save in ~/.gitconfig
# Save in gist https://gist.github.com/NicHub/df87a397567afa9d9107
[user]
name = NicHub
email = nicolas.jeanmonod@gmail.com
[core]
editor = /Applications/Visual\\ Studio\\ Code.app/Contents/Resources/app/bin/code --new-window --wait
excludesfile = ~/.gitignore
[color]
ui = auto
[alias]
# Date formating see: https://stackoverflow.com/a/34778736/3057377
lg = log --date=format:'%a %Y-%m-%d %H:%M:%S %z' --pretty=format:'%C(yellow)%h %C(red)%ad %C(blue)%<(6,trunc)%an%C(green)%d %C(reset)%s'
[diff]
tool = p4merge
[difftool]
prompt = false
[difftool "Kaleidoscope"]
cmd = ksdiff --partial-changeset --relative-path \"$MERGED\" -- \"$LOCAL\" \"$REMOTE\"
[difftool "bbdiff"]
cmd = bbdiff --wait --resume \"$LOCAL\" \"$REMOTE\"
[difftool "twdiff"]
cmd = twdiff --wait --resume \"$LOCAL\" \"$REMOTE\"
[difftool "sourcetree"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
path =
[difftool "bc4"]
cmd = \"/Applications/Beyond Compare.app/Contents/MacOS/bcomp\" \"$LOCAL\" \"$REMOTE\"
trustExitCode = true
# p4merge download urls:
# - https://www.perforce.com/downloads/visual-merge-tool
# - https://cdist2.perforce.com/perforce/r23.3/bin.macosx12u/P4V.dmg
[difftool "p4merge"]
path = /Applications/p4merge.app/Contents/MacOS/p4merge
[merge]
tool = p4merge
[mergetool]
prompt = false
[mergetool "Kaleidoscope"]
cmd = ksdiff --merge --output \"$MERGED\" --base \"$BASE\" -- \"$LOCAL\" --snapshot \"$REMOTE\" --snapshot
trustexitcode = true
[mergetool "bbdiff"]
cmd = bbdiff --wait --resume \"$LOCAL\" \"$REMOTE\"
[mergetool "twdiff"]
cmd = twdiff --wait --resume \"$LOCAL\" \"$REMOTE\"
[mergetool "sourcetree"]
cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
trustExitCode = true
[mergetool "p4merge"]
path = /Applications/p4merge.app/Contents/MacOS/p4merge
[push]
default = simple
[filter "hawser"]
clean = git hawser clean %f
smudge = git hawser smudge %f
required = true
[filter "lfs"]
clean = git lfs clean %f
smudge = git lfs smudge %f
required = true
[init]
defaultBranch = master
# [http]
# proxy = socks5://localhost:9150
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment