Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Force squash across merges: UI dialog, safety toggle, and env support #1745

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
denis-kudelin wants to merge 1 commit into sourcegit-scm:develop
base: develop
Choose a base branch
Loading
from Itexoft:master

Conversation

Copy link

@denis-kudelin denis-kudelin commented Aug 19, 2025

  • 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

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 added the not-planned It's not planned in the future label Aug 26, 2025
Copy link
Author

denis-kudelin commented Aug 26, 2025
edited
Loading

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
Reviewers
No reviews
Labels
not-planned It's not planned in the future
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /