Good day. Imagine 20 developers pushing into master, so the commit history is full of messages like:

Merge branch 'master'

I decided that it would help me:

git pull origin master 

then do another commit and then

 git rebase -i HEAD~2 // ΠΈ Ρ‚ΠΈΠΏΠ° удаляСм Π½ΡƒΠΆΠ½Ρ‹ΠΉ ΠΊΠΎΠΌΠΌΠΈΡ‚ ΠΈΠ· истории 

but rebase does not output a commit with the Merge branch 'master'

Help please understand what I am doing wrong.

    2 answers 2

    but rebase does not output a commit with the Merge branch 'master'

    and should not.

    Help please understand what I am doing wrong.

    As far as I understand your goal (to remove a merge commit from the history of a given branch), you did everything right to achieve it.

    • Yes indeed, the merge commit has disappeared, and the last commit has remained. Apparently you need to better study the rebase. Thank you. - iormark

    https://toster.ru/q/53568

     git pull --rebase origin master