Created
November 7, 2019 15:43
-
-
Save biggers/c77a19e7f4deab5ea15efe02aa8e7348 to your computer and use it in GitHub Desktop.
My dot gitconfig
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
# -*-conf-*- | |
[user] | |
# email = biggers@utsl.com | |
email = mabigger@cisco.com | |
name = Mark Biggers | |
[core] | |
autocrlf = input | |
safecrlf = false | |
pager = less -+S | |
excludesfile = ~/.gitignore_global | |
quotepath = false | |
whitespace = space-before-tab,indent-with-non-tab,trailing-space | |
[alias] | |
bl = blame -w -M -C | |
br = branch | |
co = checkout | |
dn = diff --name-only | |
dc = diff --cached | |
# short diff | |
sdf = !sh -c 'git diff "$@" | grep "^[+-]" | sort --key=1.2 | uniq -u -s1' | |
df = diff --word-diff=color --word-diff-regex=. -w --patience | |
ci = commit | |
amend = commit --amend -C HEAD | |
# fci = commit --no-verify | |
lg = log -p | |
lol = log --graph --decorate --pretty=oneline --abbrev-commit | |
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all | |
st = status | |
this = symbolic-ref HEAD | |
# Show files ignored by git: | |
ign = ls-files -o -i --exclude-standard | |
# "git stash" can suck... save to a new-branch | |
save = !sh -c 'export PBR=$(git symbolic-ref HEAD|cut -d/ -f3-) && git checkout -b "$1" && git commit -am "$1" && git checkout "$PBR"' - | |
# on your feature-branch, updating to latest 'develop': | |
# git update-from origin develop | |
update-from = "!f() { git fetch $1 --prune; git merge --ff-only $1/$2 || git rebase --preserve-merges $1/$2; }; f" | |
comm = !sh -c 'git commit -am "$1"' - | |
abort = rebase --abort | |
squash = rebase -i | |
revert = checkout -- | |
rvt = checkout -- | |
unmodify = checkout -- | |
unmerge = reset --hard ORIG_HEAD | |
unstage = reset HEAD -- | |
unadd = rm --cached | |
who = shortlog -s -- | |
whois = "!sh -c 'git log -i -1 --pretty=\"format:%an <%ae>\n\" --author=\"$1\"' -" | |
[push] | |
default = current | |
[branch] | |
# git pull --rebase *always* | |
autosetuprebase = always | |
autosetupmerge = true | |
[showbranch] | |
default = --color | |
default = --list | |
[merge] | |
tool = ediff | |
[mergetool "ediff"] | |
cmd = /usr/local/bin/emacs-mergetool.sh $LOCAL $REMOTE $MERGED $BASE | |
trustExitCode = true | |
[gitreview] | |
username = mabigger | |
email = mabigger@cisco.com | |
[color] | |
ui = auto | |
[color "branch"] | |
current = yellow reverse | |
local = yellow | |
remote = green | |
[color "diff_xx"] | |
meta = yellow bold | |
frag = magenta bold | |
old = red bold | |
nnew = green bold | |
whitespace = red reverse | |
[color "status"] | |
added = yellow | |
changed = green | |
untracked = cyan | |
# lg = log --color --graph --decorate --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --all | |
# log = log --pretty=format:'%h <%an> %s' | |
# lg2 = log --color --graph --decorate --pretty=format:\"%h %ad | %s%d [%an]\" --date=short |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment