Skip to content

Squashing all fixup! commits in current branch doesn't work on main #5087

@unikitty37

Description

@unikitty37

Describe the bug

When the current branch is main, pressing Shift-S, b to squash all fixup! commits in the current branch does nothing.

This can be worked around by selecting a commit below the oldest one to be fixed up and pressing Shift-S, a.

Squashing all commits in the current branch works in branches other than the main branch.

To Reproduce

Steps to reproduce the behaviour:

  1. Create five commits.
  2. Create a new branch and switch to it.
  3. Make a change and stage it.
  4. Select the third commit in the commit list.
  5. Press Shift-F, f to create a fixup! commit.
  6. Press Shift-S, b.
  7. Change back to the main branch.
  8. Repeat steps 3–6.

Expected behaviour

In both cases, the fixup! commit should be squashed into the commit it fixes up.

In reality, this works when the branch is not the main branch, and fails silently on the main branch.

Screenshots

If applicable, add screenshots to help explain your problem.

Version info:

  • commit=, build date=, build source=Homebrew, version=0.56.0, os=darwin, arch=arm64, git version=2.52.0
  • git version 2.52.0

Additional context

Note

Please try updating to the latest version or manually building the latest master to see if the issue still occurs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions