From 420381fe0ab8786eb0eec1c6bc1897322c3268e0 Mon Sep 17 00:00:00 2001 From: Jannik Zander Date: Tue, 17 May 2016 20:16:45 +0200 Subject: [PATCH] Reset demystified --- .gitconfig | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.gitconfig b/.gitconfig index dd4b635..210c8e2 100644 --- a/.gitconfig +++ b/.gitconfig @@ -3,18 +3,19 @@ [github] user = jannikz [alias] - aa = add -u + a = add una = reset HEAD -- + aa = add -u unaa = reset HEAD br = branch brdm = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d" co = checkout go = "!f() { git checkout -b \"$1\" 2> /dev/null || git checkout \"$1\"; }; f" ci = commit -v - undo = reset HEAD~ - redo = commit -a -c ORIG_HEAD - df = difftool - mr = mergetool + unci = reset -soft HEAD~ + amend = commit --amend + dt = difftool + mt = mergetool # dont pull without rebase, and dont push without pull (fetch & merge) pu = pull --rebase pp = "!git pull --rebase && git push" @@ -26,9 +27,9 @@ 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 + rbi = "!r() { git rebase -i HEAD~$1; }; r" + ec = 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 tail = !"git lg -10 HEAD" -- 2.43.0