Skip to content

Instantly share code, notes, and snippets.

@TheConnMan
Last active March 15, 2023 13:14
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 TheConnMan/b6af664e23156669afa7 to your computer and use it in GitHub Desktop.
Save TheConnMan/b6af664e23156669afa7 to your computer and use it in GitHub Desktop.
TheConnMan's Gitconfig
[user]
email = bcconn2112@gmail.com
name = TheConnMan
[alias]
slog = log --date-order --oneline --graph --format='%C(green)%h %Creset%C(yellow)%an%Creset %C(cyan)(%G?)%Creset %C(blue)%ad%Creset %C(red)%d%Creset %s' --date='relative'
hlog = !git slog --all
dlog = !git hlog --date='format-local: %D %T'
files = diff --name-only
undo = reset --hard HEAD
all = !git push --all && git push --tags
ac = !git add . && git commit
append = commit --amend --no-edit
all-append = !git add . && git append
staged = diff --staged
words = diff --word-diff
s = status -s
d = diff
search = "!f() { git log --date-order --all --oneline --format='%C(green)%h %Creset%C(yellow)%an%Creset %C(blue bold)%ar%Creset %s' --grep=$1; }; f"
week = !git hlog --after=\"1 week\"
authors = shortlog -s -n
spull = !git stash && git pull && git stash pop
pushu = !git push -u origin `git symbolic-ref --short HEAD`
message = show -s --pretty=medium
sco = "!f() { git stash && git checkout $1 && git pull && git stash pop; }; f"
co = checkout
p = add -p
ddevelop = !git branch --merged develop | grep -v '^[ *]*develop$' | xargs git branch -d
ddev = !git branch --merged dev | grep -v '^[ *]*dev$' | xargs git branch -d
dmaster = !git branch --merged master | grep -v '^[ *]*master$' | xargs git branch -d
default = !git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@'
trim = !git branch --merged `git default` | grep -v '^[ *]*'"$(git default)"'$' | xargs git branch -d
[core]
editor = nano -r 72
mergeoptions = --no-edit
trustctime = false
autocrlf = true
safecrlf = false
[push]
default = simple
[fetch]
prune = true
[merge]
conflictstyle = diff3
[pager]
# diff = diff-so-fancy | less --tabs=1,5 -RFX
# show = diff-so-fancy | less --tabs=1,5 -RFX
# log = diff-so-fancy | less --tabs=1,5 -RFX
[commit]
gpgsign = true
[help]
autocorrect = 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment