title: How to create local git branch with remote tracking in VS Code
body: <p>When pulling from a private git server, whenever I make a branch in VS Code it doesn't track the upstream branch.  The git output shows that it's running</p>
  
  <pre><code>git checkout -q -b NewBranchLocal --no-track origin/NewBranch
  </code></pre>
  
  <p>if I use  ">Git: Checkout to..." or ">Git: Create branch from..." command.</p>
  
  <p>Is there a best practive for pulling these from a git server?  How can I use the git extension in VS Code to create local versions of origin branches and tie it to that upstream branch?</p>
  
  <p>From what I can see in the source code for VS Code, it looks like the --no-track should only show up if the branch you're creating is being checked out, but I don't see an option where you can create a branch and not check it out.  Looking in the vscode-master/extensions/git/src folder, git.ts (line 1238) says </p>
  
  <pre><code>    async branch(name: string, checkout: boolean, ref?: string): Promise&lt;void&gt; {
          const args = checkout ? ['checkout', '-q', '-b', name, '--no-track'] : ['branch', '-q', name];
  
          if (ref) {
              args.push(ref);
          }
  
          await this.run(args);
      }
  </code></pre>
  
  <p>The only reference is in repository.ts (line 979):</p>
  
  <pre><code>    async branch(name: string, _checkout: boolean, _ref?: string): Promise&lt;void&gt; {
          await this.run(Operation.Branch, () =&gt; this.repository.branch(name, _checkout, _ref));
      }
  </code></pre>
  
  <p>This is called in the commands.ts file (line 1563) </p>
  
  <pre><code>    private async _branch(repository: Repository, defaultName?: string, from = false): Promise&lt;void&gt; {
          const branchName = await this.promptForBranchName(defaultName);
  
          if (!branchName) {
              return;
          }
  
          let target = 'HEAD';
  
          if (from) {
              const picks = [new HEADItem(repository), ...createCheckoutItems(repository)];
              const placeHolder = localize('select a ref to create a new branch from', 'Select a ref to create the \'{0}\' branch from', branchName);
              const choice = await window.showQuickPick(picks, { placeHolder });
  
              if (!choice) {
                  return;
              }
  
              target = choice.label;
          }
  
          await repository.branch(branchName, true, target);
      }
  </code></pre>
  
  <p>so there's no ability to not check out that branch, and no chance to have the new, local branch linked to the origin.</p>
  
  <p>I couldn't find any other references in the vscode-master project, so I'm stumped as to where to look next.</p>