标签 alias 下的文章

  1. 编辑 ~/.bash_profile,加入常用命令别名,例如我加入了以下命令的别名:
alias pull='git pull origin'
alias push='git push origin'
alias add='git add .'
alias commit='git commit -m'
alias checkout='git checkout'
alias status='git status'

这里需要注意 = 两边不能有空格,不然会报 not found 错误;

  1. 保存之后重新打开 terminal 或者执行一下命名:
source ~/.bash_profile

然后就可以愉快的玩耍了^ ^