打开命令行执行 echo $PROFILE 命令,确定新建文件的名称和位置
新建文件:C:\Users\41770\Documents\WindowsPowerShell
我这里的步骤(不一定和你一致)
- Users:用户
- Documents:文档
- 在
Documents文件夹下新建WindowsPowerShell文件夹 - 继续新建
Microsoft.PowerShell_profile.ps1文件
修改内容:
# 进入mini-vue
function cdvue {cd F:\github\mini-vue\}
# git使用代理提交
function git-p {
git config --global http.proxy 127.0.0.1:1080
git push
git config --global --unset http.proxy
}
重启 vscode 即可