1.打开Git Bash,查看本机根目录下是否存在.bash_profile文件,若不存在,则创建该文件:
2.编辑.bash_profile文件,在文件末尾添加以下内容:
1 | alias cls='clear' |
3.保存并关闭.bash_profile文件。
4.重新打开Git Bash,输入命令:
1 | source ~/.bash_profile |
即可生效。
By QuHou ; Published on 2025-03-25
1.打开Git Bash,查看本机根目录下是否存在.bash_profile文件,若不存在,则创建该文件:
2.编辑.bash_profile文件,在文件末尾添加以下内容:
1 | alias cls='clear' |
3.保存并关闭.bash_profile文件。
4.重新打开Git Bash,输入命令:
1 | source ~/.bash_profile |
即可生效。