bashrc: add git diff staged stat

This commit is contained in:
Jaewook Lee
2024-08-09 23:10:12 +09:00
parent 5590362558
commit 510f0a7d85
2 changed files with 10 additions and 5 deletions

View File

@@ -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