| 前言创作开始时间:2021年10月12日16:14:49 本文在此给出git bash alias的两种方案。 环境方案1:修改/etc/profile1)打开git bash2)输入:
 nano /etc/profile3)在文件末尾添加alias就行,比如:
 
  4)保存,退出即可。
 方案2:新建~/.bashrc1)打开git bash2)输入:
 nano ~/.bashrc 加入内容,如: # create a file C:\Users\[user]\.bashrc
# add this content
# add your onw aliases or changes these ones as you like
# to make a dot (.bashrs) file in windows, create a file ".bashrs." (without extention) and save. windows will save it as ".bashrc"
alias ls='ls -alh'
 3)保存,退出即可。 小结以上。 创作结束时间:2021年10月12日16:19:20 参考文献如何在Windows的Git Bash中设置别名? https://qastack.cn/programming/37104273/how-to-set-aliases-in-the-git-bash-for-windows
 |