Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Undo Multiple CommitsNew to Visual Studio Code? Get it now.
Undo Multiple Commits

Undo Multiple Commits

Jagjeet Singh

|
1 install
| (0) | Free
Adds an 'Undo Multiple Commits...' entry after 'Undo Last Commit' in the Source Control Commit menu (git reset --soft HEAD~N).
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Undo Multiple Commits

Adds an Undo Multiple Commits... entry to the Source Control view, right after Undo Last Commit in the ... > Commit submenu.

Asks how many commits to undo, shows the commits that will be undone (with warnings for merge commits and already-pushed commits), then runs git reset --soft HEAD~N. File changes are kept staged, and the undone commit messages are restored into the commit message box.

Also available from the Command Palette: Git: Undo Multiple Commits...

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft