Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Git Post Checkout CommandNew to Visual Studio Code? Get it now.
Git Post Checkout Command

Git Post Checkout Command

Sean Brace

|
583 installs
| (1) | Free
Allow you to run a terminal command following a Git Branch change.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Git Post Checkout Command

This VS Code Extension will allow you to run a terminal command following a Git Branch change.

Features

Automatically trigger terminal commands when switching branches. Good if you don't know how to set up a git hook or need a interactive terminal when switching branches.

Requirements

  • git (This extension will only work for git projects)

Extension Settings

This extension contributes the following settings:

  • git-post-checkout-command.command: Command to run. Leaving it empty will disable any action from running. Default: null
  • git-post-checkout-command.showTerminal: Show the terminal when running or leave it in the background. Enable if you need input inside of the newly created terminal. Default: false
  • git-post-checkout-command.terminateTerminal: Terminate the new terminal after the command has run. Default: true

Release Notes

Please see the CHANGELOG.md file for the list of changes

FAQ

Why not just use a git post-checkout hook?

Visual Studio Code doesn't seem to like interactive git hooks. Therefore, this extension was created to run a separate terminal to allow user input when changing a branch.

Will this run if I change branches outside of VS Code?

Not right away. It should trigger once you go back into VS Code and recognizes a branch was changed.

Contributors

Special Thanks to everybody who contributed to this project and for some reason isn't on the Contributor's list. I'll try to add names who are MIA below

  • spencerwmiles
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft