Unintentional double commits

Mojca Miklavec mojca at macports.org
Wed Dec 21 18:58:51 CET 2016


On 21 December 2016 at 18:44, Ryan Schmidt wrote:
> On Dec 21, 2016, at 04:41, Andrea D'Amore wrote:
>
>> While trying to push a small change (shell/xonsh) I managed to rebase
>> AND merge the about 300 commits since my previous update,
>> as a results those 300 commits in master now are "duplicated".
>>
>> The files in master are unaltered, except for the actual portfile I
>> was pushing, but the history is now messier.
>
> As you know, I don't understand git, so I don't understand what happened or how it happened or what the implications are.
>
> You said master is unaltered, but the summary message says the changes were pushed to master:

All the original commits are still there.

But the history now looks as if Andrea created a new branch, applied
all of the same 300 commits to his branch and then merged the two
branches together.

So now all the 300 commits are duplicated: once in the "original"
branch (unmodified) and once in "Andrea's" branch. They contain
exactly the same changes and exactly the same commit messages, but
with a different commit timestamp, with Andrea as listed committer and
having a different checksum.

You can see that with
    git log --graph [--oneline]
or some gui client.

Mojca


More information about the macports-dev mailing list