You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

VSCode中对应WebStorm「Update Project」功能的等价方案是什么?

实现VSCode中类似WebStorm「Update Project」的功能

VSCode原生没有完全等价于WebStorm「Update Project」的一键功能,但可以通过以下两种方式实现相同效果:

1. 自定义终端命令

直接在VSCode终端中执行组合命令,模拟WebStorm的操作逻辑:

# 保存当前分支,fetch所有远程分支,合并所有本地分支后切回原分支
current_branch=$(git rev-parse --abbrev-ref HEAD) && git fetch --all && for branch in $(git branch --format='%(refname:short)'); do git checkout $branch && git merge origin/$branch; done && git checkout $current_branch

如果不需要自动切回原分支,可以简化为:

git fetch --all && for branch in $(git branch --format='%(refname:short)'); do git checkout $branch && git merge origin/$branch; done

2. 通过Git扩展批量操作

借助VSCode的Git扩展简化操作步骤:

  • GitLens:先手动执行git fetch --all,然后在左侧「GitLens > Branches」面板中,选中所有需要更新的本地分支,右键选择「Merge from Remote」,选择对应远程分支完成合并。
  • Git Graph:打开Git Graph界面后先执行fetch操作,然后对每个本地分支右键选择「Merge...」,选择对应的远程分支完成合并。

内容的提问来源于stack exchange,提问作者Glenn Mohammad

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.02 14:13:14