dotfiles/shells/common/git.sh

29 lines
928 B
Bash
Raw Normal View History

2010-06-30 16:53:36 +10:00
alias gi='git init'
2010-11-22 14:53:19 +11:00
alias gst='git status -s'
2009-09-27 10:48:04 +10:00
alias gl='git pull --rebase'
alias gp='git push'
alias gpa='git push-all' # see [alias] in ~/.gitconfig
alias ga='git add'
alias gcl='git config --list'
alias gc='git commit -v'
alias gca='git commit -v -a'
2010-06-30 16:53:36 +10:00
alias gb='git branch --color'
alias gba='gb -a'
alias gco='git checkout'
alias gdc='git-svn dcommit'
alias gk='gitk --all &'
2010-06-30 16:53:36 +10:00
alias gx="open -b nl.frim.GitX"
alias grm="git stat | grep deleted | awk '{print $3}' | xargs git rm"
alias gpatch='git diff master -p'
2010-11-22 14:53:19 +11:00
alias glg="git log --decorate --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative"
2010-06-30 16:53:36 +10:00
alias ignore_empty='find . \( -type d -empty \) -and \( -not -regex ./\.git.* \) -exec touch {}/.gitignore \;'
2010-06-30 14:53:21 +10:00
function gd() {
2011-02-18 12:47:15 +11:00
git diff $* | mvim -
2010-06-30 14:53:21 +10:00
}
2010-06-30 16:53:36 +10:00
if [[ -d "/usr/local/git" ]]; then
PATH="/usr/local/git/bin:$PATH"
MANPATH="/usr/local/git/man:$MANPATH"
fi