From eae1b2008a3050033bac33a27a73f4607b7a7a59 Mon Sep 17 00:00:00 2001 From: Jannik Zander Date: Mon, 16 May 2016 22:33:22 +0200 Subject: [PATCH] Add git aliases pp, pu, rb, mf, cp, fs, wc --- .gitconfig | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/.gitconfig b/.gitconfig index 0e253af..dd4b635 100644 --- a/.gitconfig +++ b/.gitconfig @@ -3,43 +3,43 @@ [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 -- 2.43.0