1

I worked on a branch feature. I wanted to merge it to develop, so I did pull origin develop in feature before.

After that, I realized I had to push feature to staging instead of develop.

So I revert the last two commit and pushed them to the repo. But my pull request show me a lot of changes, as if I had did the changes of the merge mysself.

Any workaround?

Paul Serre
  • 457
  • 3
  • 11

1 Answers1

0

So I revert the last two commit and pushed them to the repo

A revert was not necessary: you could reset your staging branch to before the last merge (from the improper pull), switch branch, and redo the git pull.

In your case, if nobody has pushed to staging, you can still reset locally, and force push the staging branch, to restore it to its previous state.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250