1
0
mirror of https://github.com/frebib/dotfiles.git synced 2024-06-14 12:57:23 +00:00

Improved git-diff alias and git-push shortcuts

This commit is contained in:
Joe Groocock 2016-09-01 14:50:13 +01:00
parent 562233d363
commit 75a402cd02

12
aliases
View File

@ -91,9 +91,19 @@ alias grbc="grb --continue"
alias gf="git fetch" alias gf="git fetch"
alias gp="git push" alias gp="git push"
alias gpf="gp --force" alias gpf="gp --force"
alias gpup="git push --set-upstream"
alias gpupom="git push --set-upstream origin master"
alias gl="git pull --rebase" alias gl="git pull --rebase"
alias glp="gl && gp" alias glp="gl && gp"
alias gd="git diff" gd() {
local commit=$1
if [ -z "$commit" ] || [ ${commit:0:1} != '@' ]; then
git diff $@
return
else
git diff "@~${commit:1}^!"
fi
}
alias gds="git diff --staged" alias gds="git diff --staged"
alias glg="git log --stat --color" alias glg="git log --stat --color"
alias glog="git log --oneline --decorate --color --graph" alias glog="git log --oneline --decorate --color --graph"