Created
March 13, 2016 02:55
-
-
Save nima/7aac477d3d6affa6aa77 to your computer and use it in GitHub Desktop.
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
[merge] | |
tool = vimdiff | |
[user] | |
name = Nima Talebi | |
email = ntd@amazon.com | |
#name = Nima Talebi | |
#email = me@nima.id.au | |
#name = Norman Yue | |
#email = norman.yue@owasp.org | |
[core] | |
editor = vim +1 | |
pager = less -FMRiX | |
[color] | |
diff = auto | |
status = auto | |
branch = auto | |
ui = auto | |
[push] | |
#. You did not specify any refspecs to push, and the current remote | |
#. has not configured any push refspecs. The default action in this | |
#. case is to push all matching refspecs, that is, all branches | |
#. that exist both locally and remotely will be updated. This may | |
#. not necessarily be what you want to happen. | |
#. | |
#. You can specify what action you want to take in this case, and | |
#. avoid seeing this message again, by configuring 'push.default' to: | |
#. 'nothing' : Do not push anything | |
#. 'matching' : Push all matching branches (default) | |
#. 'tracking' : Push the current branch to whatever it is tracking | |
#. 'current' : Push the current branch | |
default = matching | |
[alias] | |
#. http://gitready.com/advanced/2011/10/21/ribbon-and-catchup-reading-new-commits.html | |
ribbon = tag --force _ribbon origin/master | |
catchup = log --patch --reverse --topo-order _ribbon..origin/master | |
catchup2 = log --patch --reverse --topo-order --first-parent -m _ribbon..origin/master | |
vp = !"git verify-pack -v .git/objects/pack/pack-*.idx|grep -E '^[a-f0-9]{40}'" | |
bbb = !"f(){\ | |
(\ | |
git branch -q|tr -d ' *'|\ | |
while read b; do\ | |
r=$(git config --get branch.$b.remote);\ | |
if [ $? -eq 0 ]; then\ | |
m=$(git config --get branch.$b.merge);\ | |
echo \"$b -> $r${m##refs/heads}\";\ | |
else\ | |
echo \"$b\";\ | |
fi;\ | |
done\ | |
)|column -t;\ | |
git branch -r;\ | |
}; f" | |
bb = !"f(){\ | |
git branch -qa|\ | |
sed -e 's/^..\\([^ ]*\\).*/\\1/'|\ | |
while read b; do\ | |
git log -1 --pretty=format:'%C(yellow)%h %Cblue%Cgreen%ci %Cred%an %Cblue'$b'%Creset - %C(bold yellow)%s%Creset%n' $b;\ | |
done |\ | |
sort -r -k2;\ | |
}; f" | |
b = branch -vav | |
lb = log --graph --all --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(bold white)— %an%C(reset)%C(bold yellow)%d%C(reset)' --abbrev-commit --date=relative --first-parent | |
llb = log --graph --all --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(bold white)— %an%C(reset)%C(bold yellow)%d%C(reset)' --abbrev-commit --date=relative | |
lllb = log --graph --all --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(bold white)— %an%C(reset)' --abbrev-commit | |
l = log --graph --abbrev-commit --pretty=oneline --decorate --first-parent | |
ll = log --graph --abbrev-commit --pretty=oneline --decorate | |
lll = log --stat --graph --abbrev-commit --pretty=oneline --decorate | |
llll = log --stat --graph --abbrev-commit --pretty=short --decorate | |
lllll = log --stat --graph --abbrev-commit --pretty=medium --decorate | |
llllll = log --stat --graph --abbrev-commit --pretty=full --decorate | |
lllllll = log --stat --graph --abbrev-commit --pretty=fuller --decorate | |
llllllll = log --stat --graph --abbrev-commit --pretty=fuller --decorate -p | |
last = log -1 HEAD | |
dump = log -p -1 | |
dag = log --graph --format='format:%C(yellow)%h%C(reset) %C(blue)\"%an\" <%ae>%C(reset) %C(magenta)%ar%C(reset)%C(auto)%d%C(reset)%n%s' --date-order | |
serve = !"f(){ git daemon --export-all --base-path=$(pwd)/.git/; }; f" | |
#search = log -S"important phrase" -p -- | |
#. {{ | |
delete1 = filter-branch -f --index-filter "git update-index --remove $1" HEAD | |
delete2 = !"f(){\ | |
git filter-branch -d /dev/shm/wmii/tmp --tree-filter \"rm -f $1\" HEAD;\ | |
}; f" | |
deleted = log --abbrev-commit --pretty=oneline --decorate --diff-filter=D --summary | |
dummy = "!f(){\ | |
git filter-branch -d /dev/shm/wmii/tmp --commit-filter 'git commit-tree \"$@\"' HEAD;\ | |
}; f" | |
squish = "!f(){ git rebase -i ${1}^ && git reset --mixed HEAD^; }; f" | |
r = reflog --decorate | |
rr = log -g --decorate | |
atp = diff --stat origin/master | |
topush = log origin/master..HEAD #. about to push | |
topull = log HEAD..origin/master #. about to pull | |
file = log -p -C6 --oneline -- | |
co = checkout | |
br = branch -av | |
br-mv = branch -m -- | |
ci = commit | |
n = "!f(){ git symbolic-ref HEAD refs/heads/${1}; }; f" | |
s = status -s | |
st = status | |
t = tag -l -n1 | |
cl = clone | |
rp = rev-parse master | |
rmci = rebase --onto $1^ $1 HEAD | |
clean1 = stash -u -a | |
clean2 = clean -dnx | |
whois = log --stat -i -1 --pretty=format:"%an <%ae>\n" --author="$1" | |
rlog = log --stat -p -2 | |
whatis = show -s --pretty='tformat:%h (%s, %ad)' --date=short | |
lrm = rm --cached -- | |
sdiff = diff --staged -- | |
unstage = reset HEAD -- | |
revert = checkout -- | |
rst = reset --keep master@{1} | |
bmy = branch --merged | |
bmn = branch --no-merged #. can't delete these as they've not been merged | |
noff = merge --no-ff | |
ver = rev-parse --short HEAD | |
version = log -1 --pretty=format:%H | |
[amazon] | |
append-cr-url = true | |
pull-request-by-default = true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment