Git Shortcuts

// Place your key bindings in this file to override the defaultsauto[]
[
  {
    "key": "cmd+right",
    "command": "workbench.action.navigateForward",
    "when": "canNavigateForward"
  },
  {
    "key": "ctrl+shift+-",
    "command": "-workbench.action.navigateForward",
    "when": "canNavigateForward"
  },
  {
    "key": "cmd+left",
    "command": "workbench.action.navigateBack",
    "when": "canNavigateBack"
  },
  {
    "key": "ctrl+-",
    "command": "-workbench.action.navigateBack",
    "when": "canNavigateBack"
  },
  {
    "key": "ctrl+shift+u",
    "command": "editor.action.transformToUppercase",
    "when": "editorTextFocus"
  },
  {
    "key": "ctrl+shift+l",
    "command": "editor.action.transformToLowercase",
    "when": "editorTextFocus"
  },
  {
    "key": "cmd+g cmd+g",
    "command": "git.checkout"
  }, // Custom commands
  // current branch name
  {
    "key": "cmd+g cmd+b cmd+n",
    "command": "workbench.action.terminal.sendSequence",
    "args": {
      "text": "git branch --show-current \u000D"
    }
  },
  // checkout to previous branch
  {
    "key": "cmd+g cmd+c cmd+p",
    "command": "workbench.action.terminal.sendSequence",
    "args": {
      "text": "git checkout - \u000D"
    }
  },
  // stash apply latest
  {
    "key": "cmd+g cmd+s cmd+a",
    "command": "workbench.action.terminal.sendSequence",
    "args": {
      "text": "git stash apply \u000D"
    }
  },
  // stash save
  {
    "key": "cmd+g cmd+s cmd+s",
    "command": "workbench.action.terminal.sendSequence",
    "args": {
      "text": "git stash -u \u000D"
    }
  }
]