Created
February 1, 2011 14:45
-
-
Save beekhof/805944 to your computer and use it in GitHub Desktop.
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
[core] | |
#pager = less $LESS -SFRX -SR +'/^---' | |
pager = less $LESS -X -SFRX | |
[user] | |
email = [email protected] | |
name = Andrew Beekhof | |
#[format] | |
# pretty = format:%cn, %cr %h: %s | |
[color] | |
diff = True | |
grep = True | |
status = True | |
[sendemail] | |
smtpencryption = tls | |
smtpserver = smtp.gmail.com | |
smtpuser = [email protected] | |
smtpserverport = 587 | |
[man] | |
viewer = man | |
[help] | |
format = man | |
# https://git.wiki.kernel.org/index.php/Aliases | |
[alias] | |
ci = commit | |
co = checkout | |
fp = format-patch | |
bl = blame --date=short -M | |
br = !git branch --no-color | grep '*' | sed -e 's/^* //' | |
who = shortlog -s -- | |
top = !eval cd "$(pwd)/$(git rev-parse --show-cdup)" && pwd | |
annotate = blame | |
lg = log --pretty=format:'%an (%ar) %h: %s %C(bold blue)%d%Creset' --date=relative --abbrev-commit --graph -M --all | |
slg = log --pretty=format:'%an (%ar) %h: %s %C(bold blue)%d%Creset' --date=relative --abbrev-commit --graph -M | |
log-color = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative --all | |
# Mercurial compatability | |
in = ! "echo Incoming commits from origin/master; git fetch ; git slg ..origin/master" | |
out = ! "echo Outgoing commits from branch: $(git br); git slg $(git br) --not --remotes=*/master" | |
br-in = ! "echo Incoming commits from origin/$(git br); git fetch ; git slg ..origin/$(git br)" | |
br-out = ! "echo Commits not yet uploaded to branch: $(git br); git slg $(git br) --not --remotes=*/$(git br)" | |
up = remote update | |
id = !git show --pretty="format:%h" | head -n 1 | |
id-long = !git show --pretty="format:%H" | head -n 1 | |
url = !giturl | |
amend = commit --amend -C HEAD | |
amend-log= commit --amend | |
unmerge = reset --merge ORIG_HEAD | |
discard = "!sh -c 'git diff $* | patch -p1 -R' -" | |
rollback = reset --mixed HEAD^ | |
strip = "!sh -c '[ $# = 1 ] && git reset --hard $1 && exit 0 || echo \"usage: git strip <hash> $#\" >&2 && exit 1' -" | |
edit = "!sh -c '[ $# = 1 ] && git rebase -i $1^ && exit 0 || echo \"usage: git edit <hash> $#\" >&2 && exit 1' -" | |
import = apply | |
#or... = am --signoff --3way --interactive | |
s = "!git diff --name-status | sed -e 's/^/W /' ; git diff --cached --name-status | sed -e 's/^/C /'" | |
st = "!f() { git ls-files --exclude-standard -t -u -s -m -d $@ | sed -e 's/C.*\t/C /' ; } ; f" | |
sto = !git st -o | |
br-st = ! "git ds; git in; git br-in; git out; git br-out" | |
df = diff | |
ds = diff --stat -r | |
cds = !git ds --cached | |
changes = diff --name-status -r | |
save = stash save | |
restore = stash pop | |
post = send-email --suppress-cc=self --compose --confirm=compose [email protected] | |
# git graphviz --first-parent master | dotty /dev/stdin | |
graphviz = "!f() { echo 'digraph git {' ; git log --pretty='format: %h -> { %p }' \"$@\" | sed 's/[0-9a-f][0-9a-f]*/\"&\"/g' ; echo '}'; }; f" | |
# git alias new_alias original_command | |
alias = !sh -c '[ $# = 2 ] && git config --global alias.\"$1\" \"$2\" && exit 0 || echo \"usage: git alias <new alias> <original command>\" >&2 && exit 1' - | |
aliases = !git config --get-regexp 'alias.*' | colrm 1 6 | sed 's/[ ]/ = /' | |
debug = !GIT_PAGER= gdb --args git |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment