mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-12 08:50:08 +00:00
Putting Git related aliases into git.zsh to have them in context.
This commit is contained in:
parent
90627d3d1c
commit
f9509f365b
2 changed files with 16 additions and 16 deletions
|
@ -25,21 +25,6 @@ alias ss='sudo su -'
|
|||
|
||||
#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
|
||||
alias history='fc -l 1'
|
||||
|
||||
|
@ -65,4 +50,4 @@ alias etp='mate app config lib db public spec test vendor/plugins vendor/gems Ra
|
|||
alias etts='mate app config lib db public script spec test vendor/plugins vendor/gems Rakefile Capfile Todo &'
|
||||
|
||||
# Editor Ruby file in TextMate
|
||||
alias mr='mate CHANGELOG app config db lib public script spec test'
|
||||
alias mr='mate CHANGELOG app config db lib public script spec test'
|
||||
|
|
15
lib/git.zsh
15
lib/git.zsh
|
@ -20,3 +20,18 @@ function current_branch() {
|
|||
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
|
||||
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…
Reference in a new issue