-
-
Save valdergallo/3427676 to your computer and use it in GitHub Desktop.
git confing
This file contains hidden or 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
[alias] | |
st = status | |
ci = commit | |
co = checkout | |
di = diff | |
dc = diff --cached | |
amend = commit --amend | |
aa = add --all | |
ff = merge --ff-only | |
pullff = pull --ff-only | |
noff = merge --no-ff | |
fa = fetch --all | |
pom = push origin master | |
b = branch | |
ds = diff --stat=160,120 | |
dh1 = diff HEAD~1 | |
br = branch | |
# Divergence (commits we added and commits remote added) | |
div = divergence | |
# Goodness (summary of diff lines added/removed/total) | |
gn = goodness | |
gnc = goodness --cached | |
# Fancy logging. | |
# h = head | |
# hp = head with patch | |
# r = recent commits, only current branch | |
# ra = recent commits, all reachable refs | |
# l = all commits, only current branch | |
# la = all commits, all reachable refs | |
head = !git l -1 | |
h = !git head | |
hp = "!source ~/.githelpers && show_git_head" | |
r = !git l -30 | |
ra = !git r --all | |
l = "!source ~/.githelpers && pretty_git_log" | |
la = !git l --all | |
[core] | |
excludesfile = /Users/igorevsukov/.gitignore_global | |
editor = vim | |
quotepath = false | |
[color] | |
ui = true | |
[credential] | |
helper = osxkeychain |
This file contains hidden or 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
#!/bin/bash | |
HASH="%C(yellow)%h%C(reset)" | |
RELATIVE_TIME="%C(green)%ar%C(reset)" | |
AUTHOR="%C(bold blue)%an%C(reset)" | |
REFS="%C(red)%d%C(reset)" | |
SUBJECT="%s" | |
FORMAT="$HASH}$RELATIVE_TIME}$AUTHOR}$REFS $SUBJECT" | |
show_git_head() { | |
pretty_git_log -1 | |
git show -p --pretty="tformat:" | |
} | |
pretty_git_log() { | |
git log --graph --pretty="tformat:${FORMAT}" $* | | |
# Line columns up based on } delimiter | |
column -s '}' -t | | |
# Page only if we need to | |
less -FXRS | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment