Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
163 lines (140 sloc) 4.6 KB
#
# dotphiles : https://github.com/dotphiles/dotphiles
#
# Git configuration.
#
# Authors:
# Ben O'Hara <bohara@gmail.com>
#
# Global Config
[user]
name = "Philipp Grathwohl"
email = "github@papau.org"
#signingkey = **Your GPG ID**
[branch "master"]
remote = origin
merge = refs/heads/master
[color]
branch = always
diff = always
grep = always
interactive = always
pager = true
showbranch = auto
status = auto
ui = always
[color "interactive"]
error = red bold
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow
frag = magenta
old = red
new = green
whitespace = white reverse
[color "status"]
added = yellow
changed = green
untracked = cyan
branch = magenta
[core]
pager = less -FRSX
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
[diff]
tool = vimdiff
[difftool]
prompt = false
[merge]
tool = vimdiff
[alias]
# branch
b = branch
bc = checkout -b
bl = branch -v
bL = branch -av
bx = branch -d
bX = branch -D
bm = branch -m
bM = branch -M
bs = show-branch
bS = show-branch -a
br = branch
# checkout/fetch/merge/push/rebase
# checkout
co = checkout
co0 = checkout HEAD --
coma = checkout master
# fetch
f = fetch
fm = pull
fo = fetch origin
# merge
m = merge
mom = merge origin/master
# push
p = push
pa = push --all
pt = push --tags
pu = !git push --set-upstream origin $(git rev-parse --abbrev-ref HEAD)
# rebase
r = rebase
ra = rebase --abort
rc = !git clean -f && git rebase --continue
ri = rebase --interactive
rs = rebase --skip
rom = rebase origin/master
rema = !git checkout master && git pull && git co - && git rebase master
# commit
c = commit -v
ca = commit --all -v
cm = commit --message
cam = commit --all --message
camend = commit --amend --reuse-message HEAD
cundo = reset --soft "HEAD^"
cp = cherry-pick
# diff
d = diff # Diff working dir to index
ds = diff --staged # Diff index to HEAD
dc = diff --staged # Diff index to HEAD
dh = diff HEAD # Diff working dir and index to HEAD
hub = browse
hubd = compare
# index
s = status
st = status
a = add
ia = add
ir = reset
# log
l = log --topo-order --pretty=format:'%C(yellow)%h %C(cyan)%cn %C(blue)%cr%C(reset) %s'
ls = log --topo-order --stat --pretty=format:'%C(bold)%C(yellow)Commit:%C(reset) %C(yellow)%H%C(red)%d%n%C(bold)%C(yellow)Author:%C(reset) %C(cyan)%an <%ae>%n%C(bold)%C(yellow)Date:%C(reset) %C(blue)%ai (%ar)%C(reset)%n%+B'
ld = log --topo-order --stat --patch --full-diff --pretty=format:'%C(bold)%C(yellow)Commit:%C(reset) %C(yellow)%H%C(red)%d%n%C(bold)%C(yellow)Author:%C(reset) %C(cyan)%an <%ae>%n%C(bold)%C(yellow)Date:%C(reset) %C(blue)%ai (%ar)%C(reset)%n%+B'
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
lga = log --topo-order --all --graph --pretty=format:'%C(yellow)%h %C(cyan)%cn%C(reset) %s %C(red)%d%C(reset)%n'
lm = log --topo-order --pretty=format:'%s'
lh = shortlog --summary --numbered
llf = fsck --lost-found
lg1 = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
lg2 = log --graph --abbrev-commit --decorate --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(dim white)- %an%C(reset)' --all
# remote
re = remote
rel = remote --verbose
rea = remote add
rex = remote rm
rem = remote rename
rclean = remote prune origin
getbaseurl = !git remote get-url origin | sed -r \"s/git@(.+?):(.+?)\\\\.git/https:\\\\/\\\\/\\1\\\\/\\\\2/\"
getpullrequesturl = !echo \"$(git getbaseurl)$(git config $(git config pullrequesturls.default))\"
replacebranches = !git getpullrequesturl | sed 's,$branch,'\"$(git rev-parse --abbrev-ref HEAD)\"'', | sed 's,$base,master,'
pr = !sensible-browser $(git replacebranches)
[push]
default = matching
[url "git@github.com:"]
insteadof = github:
[pullrequesturls]
github = /compare/$base...$branch?expand=1
gitlab = /merge_requests/new?merge_request[source_branch]=$branch&merge_request[target_branch]=$base
default = pullrequesturls.github