Only 3 or fewer commits can be squashed at once

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Low
    • None
    • Affects Version/s: 1.8.3
    • Component/s: Git
    • Severity 3 - Minor

      When using interactive rebase to squash > 3 commits, SourceTree seems to think it has done it correctly, but looking at the commits afterwards it is clear it has only managed to squash some of the commits.

      1. Create a new Git repository containing an empty text file
      2. Create several (I used 5) commits, each adding text to the text file
      3. Right click the very first commit and choose "Rebase children..."
      4. Select the commit at the top and repeatedly press "Squash with previous" at the bottom until only one commit is left
      5. Select "OK"

      Expected behaviour: We are left with two commits: the first commit of an empty file, and a second commit which contains all the changes made in the first 5 commits.

      Actual: I get 4 commits: The first of an empty file, the next two commits as they were before the rebase, and a 4th commit which contains the rest of the changes, squashed.

      I first experienced this with > 10 commits and each time it seemed to only squash 3 commits. I am able to work around this repeatedly entering the rebase screen or using command line.

            Assignee:
            Unassigned
            Reporter:
            P Thomson
            Votes:
            3 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: