首先使用vim ~/.bashrc进入 ~/.bashrc文件
然后在~/.bashrc文件添加以下修改 凭自己的习惯添加
alias gs='git s'
alias gst='git status'
alias ga='git add -A .'
alias gc='git commit -m'
alias gd='git diff'
alias gdicdiff='git icdiff'
alias gdopendiff='git difftool --tool=opendiff'
alias gl='git log -3'
alias gls='git log -3 --name-status'
alias gp='git pull --rebase'
alias gb='git branch'
alias gbs='git branches'
alias cdme='cd ~/Documents/mine'
alias cdwk='cd ~/Documents/work'
alias cdmd='cd ~/Documents/work/mrd'
alias cdd='cd ~/Documents/work/directory'
alias gcl='git clone'
alias gpush='git push'
alias nrs='npm run serve'
alias ns='npm run start'
alias nd='npm run dev'
alias ddnm='rm -r package-lock.json & rm -r node_modules'
然后执行 source ~/.bashrc 使配置生效