Skip to content

Feature Request: Add bulk actions (Squash, Drop, Revert, Cherry-pick) for multiple selected commits #1822

@shutelmann

Description

@shutelmann

Currently, when working with a branch's commit history, actions like Squash, Drop, Revert, and Cherry-pick can only be performed on a single commit at a time. This becomes very time-consuming and inefficient when you need to perform the same action on a range of commits. For example, if I want to squash the last 5 commits into one, or cherry-pick a specific feature consisting of 3 commits to another branch, I have to perform the action individually for each commit.

I would like the ability to select multiple commits in the commit history view (e.g., using Shift+Click or Ctrl/Cmd+Click). Once multiple commits are selected, right-clicking on the selection should bring up a context menu with the following bulk actions:

Squash: Combine all selected commits into a single new commit.

Drop: Remove all selected commits from the history (with appropriate warnings).

Revert: Create a new commit that reverses the changes made in each of the selected commits.

Cherry-pick: Apply the changes from all selected commits to the current branch (worktree) or another branch, preserving their order.

This workflow would mirror the powerful multi-select capabilities found in many desktop Git clients.

The current alternative is to use the command line or a separate desktop Git client to perform these bulk operations, which forces me to leave the SourceGit interface. While functional, it breaks the workflow and reduces the efficiency of using the UI for quick repository management.

Additional context
This feature would significantly enhance the productivity of developers who regularly use SourceGit for complex branch management, interactive rebases, and hotfix deployments. It would make the UI a more powerful and self-sufficient tool for Git operations.

A mock-up of the intended interaction:

User goes to a branch's commit history.

User selects commits A, B, and C by clicking with Shift/Ctrl held down.

User right-clicks the selected commits.

A context menu appears with options: Squash commits, Drop commits, Revert commits, Cherry-pick commits....

User selects an action (e.g., Cherry-pick commits...), and a dialog opens to choose the target branch.

Thank you for considering this feature!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions