Skip to content

Conversation

@Rajaniraiyn
Copy link

adds Revert Commit and Reset Commit to SCM graph view - part of #217987

  • Introduced git.graph.revertCommit and git.graph.resetCommit commands
  • Implemented functionality for reverting commits.
Screen.Recording.2025-10-27.at.11.55.54.PM.mov

- Introduced `git.graph.revertCommit` and `git.graph.resetCommit` commands
- Implemented functionality for reverting commits.
Copilot AI review requested due to automatic review settings October 27, 2025 18:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds two new commands to the SCM graph view: "Revert Commit" and "Reset Commit". The implementation provides users with the ability to revert commits (create a new commit that undoes changes) and reset to a specific commit (with a warning dialog for the destructive operation).

  • Added git.graph.revertCommit command that reverts a commit with --no-edit flag
  • Added git.graph.resetCommit command that resets to a commit after user confirmation
  • Extended the operation system to support the new Revert operation type

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
extensions/git/src/repository.ts Added revertCommit method that wraps the git revert operation
extensions/git/src/operation.ts Added Revert operation kind and type definition to the operation system
extensions/git/src/git.ts Implemented low-level revertCommit method that executes git revert command
extensions/git/src/commands.ts Added command handlers for graph revert and reset operations
extensions/git/package.nls.json Added localization strings for the new command titles
extensions/git/package.json Registered new commands and added them to the SCM graph context menu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants