liximomo / vscode-sftp

Super fast sftp/ftp extension for VS Code
MIT License
1.5k stars 257 forks source link

根据git的分支自动切换profile #860

Open danielaskdd opened 3 years ago

danielaskdd commented 3 years ago

Is this a similar or duplicate feature request?

Is your feature request related to a problem? Please describe. 由于开发过程中需要在生产和测试分支代码中来回切换,不同分支的代码需要上传到不同的服务器。目前我在配置文件中设置了两个profile,分别对应生产和测试服务器,在git分支切换的时候需要在vscode上手动切换profile。这种做法不是很方便,特别是在忘了切换profile的时候会导致代码上传到错误的服务器上。如果把测试分支的代码上传到生产服务器上,会造成非常严重的后果。

Describe the solution you'd like 希望在配置文件中可以设置git分支与profile的对应关系,当git切换到对应分支的时候自动选择对应profile。当前分支没有配置对应关系的时候,就选择默认的profile。

Describe alternatives you've considered

Does this project help you?