Last active
February 1, 2024 20:47
-
-
Save LeeFlannery/cfbc1c92b82e8b6ea75cf83c983a68f0 to your computer and use it in GitHub Desktop.
Git config 2024
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .gitconfig | |
# A good start. | |
[user] | |
name = Me | |
email = me@example.com | |
[core] | |
excludesfile = ./.gitignore_global | |
autocrlf = input | |
trustctime = false | |
# vscode | |
editor = code --wait | |
[init] | |
defaultBranch = main | |
# Fight! Which difftool and mergetool will YOU select? | |
# stree | |
## [difftool "sourcetree"] | |
## cmd = opendiff \"$LOCAL\" \"$REMOTE\" | |
## path = | |
## [mergetool "sourcetree"] | |
## md = /Applications/Sourcetree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\" | |
## trustExitCode = true | |
# vscode | |
[diff] | |
tool = vscode | |
[difftool "vscode"] | |
cmd = code --wait --diff $LOCAL $REMOTE | |
prompt = false | |
trustExitCode = false | |
[merge] | |
tool = vscode | |
[mergetool "vscode"] | |
cmd = code --wait $MERGED | |
keepBackup = false | |
trustExitCode = true | |
# A history alias I've always liked | |
[alias] | |
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short | |
# Only push the current branch | |
[push] | |
default = simple | |
# Delete references to branches no longer on the remote when fetching | |
# (e.g. they were merged into develop and deleted on the remote) | |
# Note - not the same as "git prune" | |
# See https://www.atlassian.com/git/tutorials/git-prune | |
[fetch] | |
prune = true | |
# Color schemas I like | |
# See https://www.atlassian.com/git/tutorials/setting-up-a-repository/git-config | |
# true => color even when piped. auto => only in interactive shell | |
[color] | |
ui = true | |
branch = auto | |
diff = auto | |
status = auto | |
# default colors are all green | |
[color "branch"] | |
current = white bold | |
local = cyan | |
remote = normal | |
# friendlier than default colors | |
[color "diff"] | |
meta = yellow bold | |
frag = magenta bold | |
old = red bold | |
new = green bold | |
# friendlier than default colors | |
[color "status"] | |
added = yellow | |
changed = green | |
untracked = cyan | |
[filter "lfs"] | |
clean = git-lfs clean -- %f | |
smudge = git-lfs smudge -- %f | |
process = git-lfs filter-process | |
required = true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment