Search code examples
visual-studio-code

VSCode equivalent of WebStorm's "Update Project"


I'm recently moving from WebStorm to VSCode and missing this "Update Project" (⌘T) feature (https://www.jetbrains.com/help/idea/sync-with-a-remote-repository.html#update). Basically what it does is git fetch --all and then git merge for each local branch (like git pull -all but also git merge for each other local branch in addition to the current local branch). Is there such a VSCode equivalent of this?


Solution

  • Based on @CollinD's comment, I ended up creating a custom user's task (wrapping hub sync) and the corresponding keybinding for it:

    tasks.json

    {
      // See https://go.microsoft.com/fwlink/?LinkId=733558
      // for the documentation about the tasks.json format
      "version": "2.0.0",
      "tasks": [
        {
          "label": "Update Project",
          "type": "shell",
          "command": "hub sync",
          "presentation": {
            "clear": true
          }
        }
      ]
    }
    

    keybindings.json

    // Place your key bindings in this file to override the defaultsauto[]
    [
      {
        "key": "cmd+t",
        "command": "workbench.action.tasks.runTask",
        "args": "Update Project"
      },
      {
        "key": "cmd+t",
        "command": "-workbench.action.showAllSymbols"
      },
      {
        "key": "ctrl+cmd+t",
        "command": "workbench.action.showAllSymbols"
      }
    ]