From: Jannik Zander Date: Tue, 24 May 2016 19:47:45 +0000 (+0200) Subject: Short git aliases X-Git-Url: https://git.zndr.dk/?a=commitdiff_plain;h=2e98f0ac9a1ec8784dc9e95cfb7c2c2c7dd0eb2c;p=dotfiles.git Short git aliases --- diff --git a/.config/bash/rc/aliases b/.config/bash/rc/aliases index b44bdc4..5bfc85f 100644 --- a/.config/bash/rc/aliases +++ b/.config/bash/rc/aliases @@ -1,3 +1,16 @@ +# Git aliases +alias gs='git status -sb ' # Note the trailing space +alias ga='git add ' # Note the trailing space +alias gbr='git branch ' # Note the trailing space +alias gci='git commit -m ' # Note the trailing space +alias gco='git checkout ' # Note the trailing space +alias gp='git pull --rebase' +alias gpp='git pull --rebase && git push -u origin ' # Note the trailing space +alias gl='git log --oneline --decorate' +alias gst='git stash ' # Note the trailing space +alias gsl='git stash list' +alias gsp='git stash pop' + alias sl=ls alias ls='ls -G' alias la='ls -AF' diff --git a/.config/git/config b/.config/git/config index 0c7514c..4f1d985 100644 --- a/.config/git/config +++ b/.config/git/config @@ -13,9 +13,11 @@ 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 - unci = reset --soft HEAD~ + ci = commit -u + cia = commit -u -a + cim = commit -u -a -m amend = commit --amend + unci = reset --soft HEAD~ diff = diff --word-diff dt = difftool mt = mergetool @@ -30,8 +32,6 @@ st = status -sb fs = "!git fetch && git status" rb = rebase - ready = rebase -i @{u} - rbi = "!r() { git rebase -i HEAD~$1; }; r" ec = config --global -e l = log --oneline --decorate --reverse lg = log --pretty=format:"%C(yellow)%h\\ %C(green)%ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short --graph