Git 자체
git config --global alias.co checkout
git config --global alias.chekcout checkout
git config --global alias.sw switch
git config --global alias.ws switch
git config --global core.editor "code --wait"
(sw가 치기 어려움)
Bash 기본
alias gs='git status'
Window PS
function gs {
param ( [string]$Path )
if ([string]::IsNullOrWhiteSpace($Path)) {
git status
} else {
git status $Path
}
}
git lg → git log 푸르게 푸르게git config --global alias.lg "log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all"
# Window
git config --global alias.lg "log --color --graph --abbrev-commit --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --all"