Adds a button in VS Code Source Control to push HEAD to refs/for/<branch> on your Gerrit remote for review.
Features
Source Control title bar button and Command Palette command: Gerrit: Push HEAD to Gerrit
Runs git push <remote> HEAD:refs/for/<branch> with a branch picker
Defaults to the current branch; override with gerritPush.defaultBranch
Remote defaults to origin; override with gerritPush.remote
Setup & Debug
Install dependencies:
npm install
Open the vscode-gerrit-push folder in VS Code.
Open the “Run and Debug” panel, choose Run Extension, and hit “Run” (or press F5). This launches an Extension Development Host that builds and loads the extension.
Usage
Open a Git workspace.
In the Source Control view title bar, click the icon button Push HEAD to Gerrit, or run the command with the same name from the Command Palette.
Pick the target branch (current branch, configured default branch, or a custom value).
Confirm the prompt git push <remote> HEAD:refs/for/<branch>.
The extension resolves the Git root via VS Code’s Git SCM (falls back to git rev-parse), so multi-repo workspaces push from the right repo.
Settings
gerritPush.defaultBranch: default branch for refs/for/<branch> (empty = current branch).
gerritPush.remote: Git remote name to push to (default origin).
Package for distribution
Install dependencies (first time or after updates):
npm install
Build a VSIX:
npm run package
The generated .vsix can be shared and installed via VS Code’s Extensions panel “Install from VSIX...”.
Metadata
Icons: generated with Nano Banana Pro (images/icon.png, images/command-icon.png)