alias命令可以讓我們用自定義的語句代替其他較長的語句,
包括路徑bin或者代碼命令
創(chuàng)建.bash_profile
打開終端潮孽,輸入以下命令
cd
vim .bash_profile
按照我上一篇文章所講揪荣,按I
進(jìn)入編輯模式
輸入如下
alias cm='commit -m'
按下esc,輸入:wq
回車
生效.bash_profile
source .bash_profile
現(xiàn)在命令git cm 'test'
即可代表git commit -m 'test'