0

I pushed branch my_branch to master via a pull request (rebase), and then found out that the changed are wrong, so I reverted the changes back via the revert button on github. After that somebody also made a change in the branch, so the git log on master is:

e8b4349 (HEAD -> master, origin/master) New change
4950ec8 (tag: 0.2.19) Revert "Copy changes from..."
b4abac7 Revert "Adapt to removal of..."
93b32ce Revert "Type hint"
303348e Type hint
01beee9 Adapt to removal of...
3239e08 Copy changes from...

And the git log on my_branch is:

08d8a12 (HEAD -> my_branch, origin/my_branch) Type hint
702bbb1 Adapt to removal of...
383cd4d Copy changes from...

Problem is, now I want to continue to work on my_branch and merge/rebase it to master eventually. for that I need to get changes from master, but when I do:

git merge master

I also get the revert commits - As if they are also new changes from the master:

3ad9d2c (HEAD -> my_branch) Merge branch 'master' into my_branch
e8b4349 (origin/master, master) New Change
4950ec8 (tag: 0.2.19) Revert "Copy changes from..."
b4abac7 Revert "Adapt to removal of..."
93b32ce Revert "Type hint"
303348e Type hint
01beee9 Adapt to removal of...
3239e08 Copy changes from...

How can I avoid that, and eventually be able to merge my changes to master?

omer mazig
  • 865
  • 2
  • 10
  • 15

0 Answers0