将.bash_profile文件中的内容复制到本地 ~/.bash_profile中即可。
如果你不想使用xxxxxxx:BranchName 的形式,你可以修改 parse_git_branch函数中的sed命令。
对sed命令第二个-e后面的字符串中的/:\1/部分进行修改。两侧的反斜杠是一个界限,不要修改,也不要在此之外做修改。\1代表着BranchName前后添加你希望添加的字符就可以(使用转义字符请自行参考sed命令)。这些字符在非git项目的目录是不会显示的。
| :: 删除之前的接口代理 | |
| netsh interface portproxy reset | |
| :: 查询WSL的IP地址 | |
| for /f %%i in ('wsl hostname -I') do ( | |
| SET wsl_ip=%%i | |
| ) | |
| :: 将本地端口与WSL的IP地址绑定 | |
| SET wsl_port=3000 |
| [user] | |
| name = your_name | |
| email = your_email | |
| [alias] | |
| # View abbreviated SHA, description, and history graph of the latest 20 commits | |
| l = log --pretty=oneline -n 20 --graph --abbrev-commit | |
| # View the current working tree status using the short format | |
| s = status -s | |
| p = pull | |
| b = branch |
| #!/bin/bash | |
| function remove_dir () { | |
| rm -rf "$1_" | |
| if [ -d "$1" ] | |
| then | |
| mv "$1" "$1_" | |
| fi | |
| } |