[英]Pull Request show lot of changes after revert commits
I worked on a branch feature
.我在一个分支
feature
上工作。 I wanted to merge it to develop
, so I did pull origin develop
in feature
before.我想把它合并到
develop
,所以我之前在feature
中pull origin develop
。
After that, I realized I had to push feature
to staging
instead of develop
.在那之后,我意识到我必须将
feature
推送到staging
而不是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?任何解决方法?
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
.不需要还原:您可以将暂存分支重置为上次合并之前(来自不正确的
pull
),切换分支,然后重做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.在您的情况下,如果没有人推送到暂存,您仍然可以在本地重置,并强制推送暂存分支,以将其恢复到之前的 state。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.