skip to Main Content

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?

2

Answers


  1. Chosen as BEST ANSWER

    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"
      }
    ]
    

  2. Yes, in the Git tab, you can sync changes with the remote branch. I don’t believe it’s exactly like the "Update Project" in JetBrains, but it’s very similar. You can also install the GitLens extension (highly suggested) to improve the Git integration in VSCode. Here’s a link that gives you an intro to Git in VSCode.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search