Add a confirmation dialog with option to revert instead to "Git: Undo Last Commit" when last commit has been pushed

Open
#324,093 0 comments 0 reactions 1 assignee View on GitHub

@lszomoru is already working on this.

Since Jul 2, 2026.

Assessment

This issue has not been assessed yet.

Description

Git: Undo Last Commit does a soft reset, which is usually what a user wants when the commit has not yet been pushed, and often is not what the user wants when the commit has been pushed (since it will then require force-pushing the new commit, which is typically only used by advanced users). VSCode should detect which of these situations it is in and suggest the appropriate action through a dialog.

Dominant language
TypeScript
Stars
193k
Forks
42.9k
PR merge metrics
PR metrics pending

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/vscode

All issues in microsoft/vscode

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.