在mac中设置命令别名的方法如下:
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’
2、保存之后重新打开terminal或者执行
source ~/.bash_profile
3、愉快的使用起来^ ^