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

View File

@@ -18,7 +18,7 @@ set incsearch " 입력하는 동안 실시간 검색
set hlsearch " 검색 결과 하이라이트
" 기타 유용한 설정
" set clipboard=unnamedplus " 시스템 클립보드 사용
set clipboard=unnamedplus " 시스템 클립보드 사용
set autoindent " 자동 들여쓰기
set smartindent " 스마트 들여쓰기
set wrap " 줄 바꿈
@@ -35,5 +35,5 @@ set background=dark " 어두운 배경 설정
" 파일 탐색기 설정 (NERDTree 사용 시)
" 플러그인 설치 후 사용
" nmap <C-n> :NERDTreeToggle<CR> " Ctrl+n으로 NERDTree 열기
se mouse+=a
"
set mouse-=a