bash-it/plugins/git.plugin.bash

36 lines
926 B
Bash

#!/bin/bash
# Aliases
alias g='git'
alias gst='git status'
alias gs='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'
function git-help() {
echo "Git Custom Aliases Usage"
echo
echo " g = git"
echo " gst/gs = git status"
echo " gl = git pull"
echo " gup = git fetch && git rebase"
echo " gp = git push"
echo " gd = git diff | mate"
echo " gdv = git diff -w \"$@\" | vim -R -"
echo " gc = git commit -v"
echo " gca = git commit -v -a"
echo " gb = git branch"
echo " gba = git branch -a"
echo " gcount = git shortlog -sn"
echo " gcp = git cherry-pick"
echo
}