Find file
Fetching contributors…
Cannot retrieve contributors at this time
84 lines (69 sloc) 2.41 KB
[alias]
ci = commit
cim = commit -m
ciam = commit -am
ciaam = "!git add -A && git ciam"
co = checkout
cod = checkout -
st = status -sb
br = branch
diffc = diff --cached
pl = pull
ps = push
pls = "!git pull && git push"
pick = cherry-pick
pick-all = !sh -c '(git show $1 2>&1 > /dev/null || (git fetch origin && git show $1 2>&1 > /dev/null)) && git co staging && git pull && git pick $1 $2 && git pls && git co production && git pull && git pick $1 $2 && git pls && git co master && git pull' -
uncommit = reset --soft HEAD^
amend = commit -a --amend --no-edit
amendm = commit -a --amend # amend with message
rmuntracked = clean -df
l = log --pretty=format:'%h %an %Cred%ar %d %Cgreen%s'
rmb = !sh -c '(git branch -D $1 >/dev/null 2>&1 || true) && (git push origin :$1 >/dev/null 2>&1 || true) && rm .git/refs/remotes/origin/$1 >/dev/null 2>&1' - # using semiconol -> syntax error :/
adrc = "!git add . && git rebase --continue"
adpc = "!git add . && git pick --continue"
rbm = "!git checkout master && git fetch origin && git reset --hard origin/master && git checkout - && git rebase master"
clear = "!git reset .; git co .; git clean -f"
parent-update = "!git co master && git fetch parent && git reset --hard parent/master"
amend-to = !sh -c 'git stash && git edit $1 && git stash pop && git edit --amend' -
rprune = !git checkout master && git pull && git remote prune origin && git branch --merged | grep -v '*' | xargs git branch -d
# shortcuts so I get autocomlete
stached-switch = "!~/dotfiles/bin/git-stached-switch"
edit = "!~/dotfiles/bin/git-edit"
request = "!~/dotfiles/bin/git-pull-request"
whence = "!git-whence"
[apply]
whitespace = nowarn
[diff]
rename = copy
compactionHeuristic = true
[color]
branch = auto
diff = auto
status = auto
[color "branch"]
current = green
local = blue
remote = yellow
#normal status has added/changed = green untracked/deleted/conflic = red -> more colors
[color "status"]
added = yellow
changed = green
untracked = cyan
[pager]
color = true
log = diff-highlight | less
show = diff-highlight | less
diff = diff-highlight | less
[interactive]
diffFilter = diff-highlight
[core]
excludesfile = ~/.gitignore
pager = less -S
[push]
default = current
[branch]
autosetuprebase = always # rebase when pulling
[rerere]
enabled = true # store resolved rebase steps even when aborted
[hub]
protocol = https