Browse Source

Putting Git related aliases into git.zsh to have them in context.

Martin Klepsch 15 years ago
parent
commit
0d00b8a636
  1. 15
      lib/aliases.zsh
  2. 15
      lib/git.zsh

15
lib/aliases.zsh

@ -25,21 +25,6 @@ alias ss='sudo su -'
#alias g='grep -in' #alias g='grep -in'
# Git related
alias g='git'
alias gst='git status'
alias gl='git pull'
alias gup='git fetch && git rebase'
alias gp='git push'
alias gd='git diff | mate'
alias gdv='git diff -w "$@" | vim -R -'
alias gc='git commit -v'
alias gca='git commit -v -a'
alias gb='git branch'
alias gba='git branch -a'
alias gcount='git shortlog -sn'
alias gcp='git cherry-pick'
# Show history # Show history
alias history='fc -l 1' alias history='fc -l 1'

15
lib/git.zsh

@ -20,3 +20,18 @@ function current_branch() {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return ref=$(git symbolic-ref HEAD 2> /dev/null) || return
echo ${ref#refs/heads/} echo ${ref#refs/heads/}
} }
# Aliases
alias g='git'
alias gst='git status'
alias gl='git pull'
alias gup='git fetch && git rebase'
alias gp='git push'
alias gd='git diff | mate'
alias gdv='git diff -w "$@" | vim -R -'
alias gc='git commit -v'
alias gca='git commit -v -a'
alias gb='git branch'
alias gba='git branch -a'
alias gcount='git shortlog -sn'
alias gcp='git cherry-pick'

Loading…
Cancel
Save