首页 > 解决方案 > why git merge is not showing any difference

问题描述

I have a branch called dev where I put some code for ejb changes and committed it to github, but the code didnt work, so to preserve the work, I created a branch out of dev called ejb_change and pushed to github. I reverted the code in dev branch and committed more codes in dev branch and now I want to merge the ejb_change branch to dev branch. But when I do a git merge ejb_change/ raise Pull Request, git is telling there are no change to merge. I am not able to understand

How do I put the ejb_change changes on top of current dev branch

标签: gitgithub

解决方案


如果您已还原(如 used git revert),则 ejb_branch 指向的修订版是 dev 历史的一部分……因此,如果您尝试将 ejb_change 合并到 dev 中,git 会告诉您那里没有可合并的内容。

如果是这种情况(我知道是这种情况,因为您已经说过),那么您可以尝试挑选您恢复的原始修订版(不确定它是否会起作用,因为修订版是当前历史的一部分分支)......或恢复反转修订......不优雅,但应该工作。


推荐阅读