mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
pulled and merged upstream changes
This commit is contained in:
commit
c3a46cd127
38 changed files with 548 additions and 28 deletions
36
plugins/git/git.plugin.zsh
Normal file
36
plugins/git/git.plugin.zsh
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
# Aliases
|
||||
[[ -x $(which hub) ]] && function git(){hub "$@"}
|
||||
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'
|
||||
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'
|
||||
<<<<<<< HEAD:plugins/git.plugin.zsh
|
||||
=======
|
||||
alias glg='git log --stat --max-count=5'
|
||||
>>>>>>> upstream/master:plugins/git/git.plugin.zsh
|
||||
|
||||
# Git and svn mix
|
||||
alias git-svn-dcommit-push='git svn dcommit && git push github master:svntrunk'
|
||||
|
||||
#
|
||||
# Will return the current branch name
|
||||
# Usage example: git pull origin $(current_branch)
|
||||
#
|
||||
function current_branch() {
|
||||
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
|
||||
echo ${ref#refs/heads/}
|
||||
}
|
||||
|
||||
# these aliases take advangate of the previous function
|
||||
alias ggpull='git pull origin $(current_branch)'
|
||||
alias ggpush='git push origin $(current_branch)'
|
||||
alias ggpnp='git pull origin $(current_branch) && git push origin $(current_branch)'
|
||||
Loading…
Add table
Add a link
Reference in a new issue