bashrc: add git diff staged stat
This commit is contained in:
@@ -36,7 +36,9 @@ alias ping="ping -c 2"
|
||||
|
||||
diff() {
|
||||
if [[ $# -eq 0 ]]; then
|
||||
git diff --staged
|
||||
clear
|
||||
git status
|
||||
git diff --staged
|
||||
else
|
||||
diff -qr "$@"
|
||||
fi
|
||||
@@ -70,7 +72,7 @@ alias pull="git pull"
|
||||
alias add="git add"
|
||||
alias remote="git remote -v"
|
||||
alias stash="git stash"
|
||||
|
||||
alias vimrc="vi ~/.vimrc"
|
||||
commit() {
|
||||
git commit -m "$*"
|
||||
}
|
||||
@@ -82,6 +84,9 @@ git() {
|
||||
elif [[ "$1" == "remote" ]]; then
|
||||
shift
|
||||
command git remote -v "$@"
|
||||
elif [[ "$1" == "status" ]]; then
|
||||
command git status .
|
||||
command git diff --staged --stat
|
||||
else
|
||||
command git "$@"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user