bashrc: add git diff staged stat
This commit is contained in:
@@ -36,6 +36,8 @@ alias ping="ping -c 2"
|
|||||||
|
|
||||||
diff() {
|
diff() {
|
||||||
if [[ $# -eq 0 ]]; then
|
if [[ $# -eq 0 ]]; then
|
||||||
|
clear
|
||||||
|
git status
|
||||||
git diff --staged
|
git diff --staged
|
||||||
else
|
else
|
||||||
diff -qr "$@"
|
diff -qr "$@"
|
||||||
@@ -70,7 +72,7 @@ alias pull="git pull"
|
|||||||
alias add="git add"
|
alias add="git add"
|
||||||
alias remote="git remote -v"
|
alias remote="git remote -v"
|
||||||
alias stash="git stash"
|
alias stash="git stash"
|
||||||
|
alias vimrc="vi ~/.vimrc"
|
||||||
commit() {
|
commit() {
|
||||||
git commit -m "$*"
|
git commit -m "$*"
|
||||||
}
|
}
|
||||||
@@ -82,6 +84,9 @@ git() {
|
|||||||
elif [[ "$1" == "remote" ]]; then
|
elif [[ "$1" == "remote" ]]; then
|
||||||
shift
|
shift
|
||||||
command git remote -v "$@"
|
command git remote -v "$@"
|
||||||
|
elif [[ "$1" == "status" ]]; then
|
||||||
|
command git status .
|
||||||
|
command git diff --staged --stat
|
||||||
else
|
else
|
||||||
command git "$@"
|
command git "$@"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ set incsearch " 입력하는 동안 실시간 검색
|
|||||||
set hlsearch " 검색 결과 하이라이트
|
set hlsearch " 검색 결과 하이라이트
|
||||||
|
|
||||||
" 기타 유용한 설정
|
" 기타 유용한 설정
|
||||||
" set clipboard=unnamedplus " 시스템 클립보드 사용
|
set clipboard=unnamedplus " 시스템 클립보드 사용
|
||||||
set autoindent " 자동 들여쓰기
|
set autoindent " 자동 들여쓰기
|
||||||
set smartindent " 스마트 들여쓰기
|
set smartindent " 스마트 들여쓰기
|
||||||
set wrap " 줄 바꿈
|
set wrap " 줄 바꿈
|
||||||
@@ -35,5 +35,5 @@ set background=dark " 어두운 배경 설정
|
|||||||
" 파일 탐색기 설정 (NERDTree 사용 시)
|
" 파일 탐색기 설정 (NERDTree 사용 시)
|
||||||
" 플러그인 설치 후 사용
|
" 플러그인 설치 후 사용
|
||||||
" nmap <C-n> :NERDTreeToggle<CR> " Ctrl+n으로 NERDTree 열기
|
" nmap <C-n> :NERDTreeToggle<CR> " Ctrl+n으로 NERDTree 열기
|
||||||
|
"
|
||||||
se mouse+=a
|
set mouse-=a
|
||||||
|
|||||||
Reference in New Issue
Block a user