Interactive permutation for my commits only

While working on my branch, I combined the leading branch so that my work is updated with the master.

Now that I want to clear my commit history (squash / pick), I get all the commits from the main branch as well git rebase myBranch -i HEAD myfirstcommit

How can I filter commits from the main branch, so I can only change my own commits?

+4
source share
1 answer

Once you have merged masterinto your branch, staying in your branch, follow these steps:

git rebase -i master

This will restore your branch over master, only with new commits that are in your branch, but not in master.

+3

Source: https://habr.com/ru/post/1654100/


All Articles