[github]
user = jannikz
[alias]
- aa = add -uv
- unstage = reset HEAD --
- unaa = reset --mixed HEAD
- uhaa = reset --hard HEAD
+ aa = add -u
+ una = reset HEAD --
+ unaa = reset HEAD
br = branch
- brv = branch -vv
- bra = branch -ra
- brd = branch -d
brdm = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d"
co = checkout
- cob = checkout -b
go = "!f() { git checkout -b \"$1\" 2> /dev/null || git checkout \"$1\"; }; f"
ci = commit -v
- cia = commit -av
- ciam = commit -av --amend
- unci = reset --mixed HEAD~
- uhci = reset --hard HEAD~
- dt = difftool
- dtc = difftool --cached
- mt = mergetool
- st = status --short --branch
- tg = tag -l
- reb = "!r() { git rebase -i HEAD~$1; }; r"
- pu = push --tags
- pl = pull --rebase
+ undo = reset HEAD~
+ redo = commit -a -c ORIG_HEAD
+ df = difftool
+ mr = mergetool
+ # dont pull without rebase, and dont push without pull (fetch & merge)
+ pu = pull --rebase
+ pp = "!git pull --rebase && git push"
+ # avoid merge commits
+ mf = merge --ff-only
+ cp = cherry-pick
+ wc = whatchanged -p
+ ch = cherry -v
+ st = status -sb
+ fs = "!git fetch && git status"
+ rb = rebase
+ rbi = "!r() { git rebase -i HEAD~$1; }; r"
+ ready = rebase -i @{u}
ed = config --global -e
+ l = log --oneline --decorate
lg = log --pretty=format:"%C(yellow)%h\\ %C(green)%ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short --graph
- ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
- ls = ls-files
tail = !"git lg -10 HEAD"
last = log -1 HEAD
+ ls = ls-files
+ lt = tag -l
type = cat-file -t
dump = cat-file -p
who = shortlog -s --
remotes = remote -v
root = rev-parse --show-toplevel
-
cl = clone --recursive
# Show the diff between the latest commit and the current state