Skip to content

Conversation

denis-kudelin
Copy link

  • Adds “Force squash to here…” in the commit context menu, gated by Preferences → “Enable dangerous history rewrites.”
  • New dialog with options: create backup branch, auto-stash local changes, keep target commit’s author/date, append messages from squashed commits.
  • Implementation: soft-reset to the target’s first parent, create a single commit, restore stash, then open Push dialog with Force Push preselected.
  • Adds new commands: IsAncestor, DiffAll, DiffStat; extends Command with Envs to pass env vars (e.g., GIT_COMMITTER_DATE).
  • Updates localizations for all supported languages.
Screenshot 2025-08-19 at 05 08 23

@denis-kudelin denis-kudelin marked this pull request as ready for review August 19, 2025 04:42
@love-linger love-linger force-pushed the develop branch 2 times, most recently from 6a192c4 to e2ba3e0 Compare August 19, 2025 04:57
@love-linger love-linger force-pushed the develop branch 3 times, most recently from f325aaf to 6511d15 Compare August 19, 2025 07:54
@love-linger
Copy link
Collaborator

I'm very sorry, but I don't want this operation to be introduced into SourceGit. As shown in your code, this is a combined command. Users can originally complete this operation in the following steps:

Step 1. Stash local changes. (Optional)
Step 2. Create a temp branch based the merge source branch or just checkout it. (Optional. If they do NOT want to backup original branch, they can use it directly)
Step 3. Interactive-Rebase source branch (checkouted on Step 2) to target branch

@love-linger love-linger self-assigned this Aug 26, 2025
@love-linger love-linger added the not-planned It's not planned in the future label Aug 26, 2025
@denis-kudelin
Copy link
Author

denis-kudelin commented Aug 26, 2025

I'm very sorry, but I don't want this operation to be introduced into SourceGit. As shown in your code, this is a combined command. Users can originally complete this operation in the following steps:

Step 1. Stash local changes. (Optional) Step 2. Create a temp branch based the merge source branch or just checkout it. (Optional. If they do NOT want to backup original branch, they can use it directly) Step 3. Interactive-Rebase source branch (checkouted on Step 2) to target branch

I know it’s dangerous, but I work with a large number of repositories and I’m tired of cleaning up history. By the way, I hid this feature behind a checkbox in the settings. Nobody will click it by accident.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not-planned It's not planned in the future
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants