Skip to content

Support Reverting a Commit Without Automatically Committing #943

Open

Description

@PondPackMan2023

Summary

Git Graph's Revert Commit action immediately creates a revert commit. Please add an option that applies the inverse changes without creating the commit, equivalent to:

git revert --no-commit <commit>

This would allow users to review, adjust, build, and test the reverted changes before committing them.

Motivation

The current behavior works for a simple direct-revert workflow, but it does not support workflows where all changes must be reviewed and submitted through a pull request.

For example, our release branches are protected and require changes to follow this process:

  1. Create a working branch from the release branch.
  2. Apply the revert on the working branch.
  3. Review the resulting changes.
  4. Build and test the changes.
  5. Commit the reviewed revert.
  6. Submit a pull request targeting the release branch.

Git supports this workflow through git revert --no-commit, but Git Graph does not currently expose that option. Using Revert Commit immediately creates the commit, removing the opportunity to inspect and validate the inverse changes first.

Proposed Behavior

Provide both revert workflows in the commit context menu or in a confirmation dialog:

  • Revert Commit
  • Revert Commit Without Committing

The second option should perform the equivalent of:

git revert --no-commit <commit>

The resulting changes should remain available in Source Control for normal review, modification, staging, testing, and manual commit creation.

Expected Benefit

This would expose an existing Git capability and support protected-branch and pull-request workflows without requiring users to leave Git Graph and run the command manually in a terminal.

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

Metadata

Metadata

Assignees

Labels

feature request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions