Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
275 lines (220 sloc) 8.094 kB
[user]
email = braulio@eita.org.br
name = Braulio Bhavamitra
[sendemail]
smtpencryption = tls
smtpserver = smtp.gmail.com
smtpuser = brauliobo@gmail.com
smtpserverport = 587
[apply]
ignorewhitespace = change
whitespace = nowarn
[push]
default = upstream
rebase = true
[color]
interactive = true
branch = true
status = true
[core]
mergeoptions = --no-edit
#pager = less -FiR # -F is necessary but has problems with tmux and regular shells
pager = most
#pager = vimpager
#pager = more -p
[mergetool "vimdiff3"]
cmd = vim -u ~/.vimrc -f -d -c \"wincmd J\" \"$MERGED\" \"$LOCAL\" \"$BASE\" \"$REMOTE\"
[alias]
root = rev-parse --show-toplevel
#cdroot = !cd `git root`
upstream = !git for-each-ref --format='%(upstream:short)' $(git symbolic-ref -q HEAD)
upstream-remote = !git upstream | sed -e 's/\\/.*$//g'
out = !git fetch `git upstream-remote` && git l `git upstream`..HEAD
in = pull --dry-run
co = checkout
coc = checkout .
cob = checkout -b
cobf = "!f() { git brd $1; git cob $1; }; f"
col = checkout HEAD~1
cotc = !git sttc | xargs git checkout
como = !git stmo | xargs git checkout
ours = checkout --ours
theirs = checkout --theirs
aours = "!f() { (git reset $* >/dev/null); git ours $* && git add $*; }; f"
atheirs = "!f() { (git reset $* >/dev/null); git theirs $* && git add $*; }; f"
ci = commit
cie = commit --allow-empty
cia = commit -a
cam = commit --amend
cama = commit --amend -a
cl = clean
cldf = clean -df
res = reset
resa = reset HEAD
resh = "!f() { git stash && git reset --hard $@; }; f"
reshu = !git fetch `git upstream-remote` && git resh `git upstream`
reshh = !git stash && git reset --hard HEAD
cundo = reset HEAD^1
cundoh = !git stash && git reset HEAD^1 --hard
unstage = reset HEAD
tags = tag -l
pg = diff
pgs = diff --staged
pa = apply
s = show --color --color-words='[^[:space:]]|([[:alnum:]]|UTF_8_GUARD)+'
sf = show --color --name-only
d = diff --color --color-words='[^[:space:]]|([[:alnum:]]|UTF_8_GUARD)+'
du = !git d `git upstream`
dw = !git d -w
ds = !git d --staged
dsf = !git d --staged --name-only
df = !git d --name-only
dc = "!f() { HASH=$1; shift 1; git diff --cc $HASH $HASH^1 $HASH^2 $@; }; f"
lp = log -m --no-merges --color -p
lf = log -m --no-merges --color -p --name-only
lg = log -m --simplify-merges --color --graph --pretty=format:'%Cred%h%Creset %s %Cgreen(%cr) %Cblue%an <%ae>%Creset' --abbrev-commit --date=relative
lgu = !git lg `git upstream`
lg2 = !source ~/.githelpers && pretty_git_log
lgp = !git lg --no-merges -p
lgpw = !git lg --no-merges -p --color-words='[^[:space:]]|([[:alnum:]]|UTF_8_GUARD)+'
lgf = !git lg --no-merges -p --name-only
l = log -m --simplify-merges --color --pretty=format:'%Cred%h%Creset %s %Cgreen(%cr) %Cblue%an <%ae>%Creset' --abbrev-commit --date=relative
lc = "!f() { git log $* | grep '^commit ' | cut -f 2 -d ' '; }; f"
f = fetch
fu = !git fetch `git upstream-remote`
fa = fetch --all
fo = fetch origin
m = merge --no-edit
unm = reset --merge
ps = push
psu = push -u
psn = "!f() { git ps $1 `git brc`; }; f"
psnf = "!f() { git psf $1 `git brc`; }; f"
psun = "!f() { git psu $1 `git brc`; }; f"
pso = push origin
psoun = !git psu origin `git brc`
psf = push -f
psuf = push -uf
pssm = push --recurse-submodules=on-demand
psremoveallbranches = "!f() { git push $1 `git brar $1 | grep -v master | xargs -I {} echo :{}`; }; f"
pl = pull
plo = pull origin
plom = pull origin master
plr = pull --rebase
st = status
sttc = !git status | grep typechange | awk '{print $2}'
stmo = !git status | grep modified | awk '{print $2}'
a = add --all
ap = add -p
resolve-unmerged = !git add `git unmerged`
add-untracked = !git add `git untracked`
as = !git diff -w --no-color | git apply --cached
rs = !(git resa && git as && git co . && git resa) &>/dev/null
rmf = rm -rf
rmtheirs = !git rm `git removedbytheirs`
rmours = !git rm `git removedbyours`
unmerged = !git ls-files --unmerged | cut -f2 | uniq
theirsunmerged = !git ls-files --unmerged | grep \"\\\\s3\\\\s\" | cut -f2 | uniq
oursunmerged = !git ls-files --unmerged | grep \"\\\\s2\\\\s\" | cut -f2 | uniq
removedbyours = !bash -c 'source ~/.githelpers && diff_array \"`git theirsunmerged`\" \"`git oursunmerged`\"'
removedbytheirs = !bash -c 'source ~/.githelpers && diff_array \"`git oursunmerged`\" \"`git theirsunmerged`\"'
untracked = ls-files --other --exclude-standard
staged = ls-files --staged
modified = ls-files --modified
deleted = ls-files --deleted
gitignored = ls-files -o -i --exclude-standard
sig = !git ls-files -v | grep "^[[:lower:]]"
ig = update-index --assume-unchanged
uig = update-index --no-assume-unchanged
ignore = update-index --assume-unchanged
ignored = !git sig
gitignore-untracked = !git gitignore `git untracked`
ig-untracked = !git ignore `git untracked`
gitignore = !cd `git root` && touch .gitignore
head = !git l -1
h = !git head
hp = !source ~/.githelpers && show_git_head
r = !git l -20
ra = !git r --all
sh = stash
sha = stash apply
shl = stash list
shd = stash drop
shc = stash clear
chp = cherry-pick
chpc = cherry-pick --continue
chpq = cherry-pick --quit
chpa = cherry-pick --abort
am3 = am -3
amr = am --resolved
amc = am --continue
ama = am --abort
ams = am --skip
rv = revert
rvc = revert --continue
rva = revert --abort
fm = format-patch
rb = rebase
rbi = rebase -i
rbtc = !git theirs `git unmerged` || git resolve-unmerged && (git rbc || git rbs)
rboc = !git ours `git unmerged` || git reset `git unmerged` && git a . && (git rbc || git rbs)
rbc = rebase --continue
rba = rebase --abort
rbs = rebase --skip
squash = !"f() { NL=$1; GIT_EDITOR=\"sed -i '2,$NL s/pick/squash/;/# This is the 2nd commit message:/,$ {d}'\"; git rebase -i HEAD~$NL; }; f"
sq = !git squash $1
sqpsf = !git squash $1 && git psf
bs = bisect
bsr = bisect reset
bsb = bisect bad
bsg = bisect good
mt = mergetool
vm = !vim `git unmerged`
vmo = !vim `git modified`
vt = !vim `git untracked`
vim-unmerged = !git vm # deprecated
current = rev-parse --abbrev-ref HEAD
br = branch
brc = rev-parse --abbrev-ref HEAD
brt = branch --track
brup = branch --set-upstream
bra = !git branch -a | less -FiRS
brar = "!f() { git bra | grep remotes/$1/ | cut -f 3 -d '/'; }; f"
brd = branch -D
brco = branch --contains
brcommits = "!f() { git lc --branches=$1* }; f"
brdiff = !source ~/.githelpers && diff_branches
brfdiff = !source ~/.githelpers && diff_branches_show_files
rem = remote
rema = remote add
remr = remote rm
remv = remote -v
remotes = remote -v
sm = submodule
smst = submodule --status
sma = submodule add
smu = submodule update
sme = submodule foreach
smepl = submodule foreach "(git checkout master; git pull)&"
smui = submodule update --init
smuir = submodule update --init --recursive
sms = submodule sync
bl = blame
gcp = gc --prune=now
gca = gc --aggressive
gcap = gc --aggressive --prune=now
# git change-commits GIT_COMMITTER_NAME "old name" "new name"
change-commits = "!f() { VAR=$1; OLD=$2; NEW=$3; shift 3; git filter-branch --env-filter \"if [[ $`echo $VAR` = \\\"$OLD\\\" ]]; then export $VAR=\\\"$NEW\\\"; fi\" $@; }; f"
# from https://help.github.com/articles/remove-sensitive-data
remove-file = "!f() { git filter-branch -f --index-filter \"git rm --cached --ignore-unmatch $1\" --prune-empty --tag-name-filter cat -- --all; }; f"
rf = reflog
rfe = reflog expire --expire=now --all
pr = prune
prm = !git rfe && git gcp
fsize = git ls-tree -r -t -l --full-name HEAD | sort -rn -k 4 | less
findemptydirs = !"find . -type d -empty ! -path ./tmp/\\*"
deleteemptydirs = !"find . -type d -empty ! -path ./tmp/\\* -exec rmdir {} \\;"
### specifics
mps = "!f() { cd ../$1; git m master; git ps; }; f"
cmps = "!git mps cirandas"
bmps = "!git mps blogoosfero"
Jump to Line
Something went wrong with that request. Please try again.