在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、愉快的使用起来^ ^
本文介绍如何在Mac系统中通过编辑~/.bash_profile文件来设置Git命令的别名,包括pull、push、add、commit等常用命令的简化操作方式。

1534

被折叠的 条评论
为什么被折叠?



