git - 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
解决方案
如果您已还原(如 used git revert
),则 ejb_branch 指向的修订版是 dev 历史的一部分……因此,如果您尝试将 ejb_change 合并到 dev 中,git 会告诉您那里没有可合并的内容。
如果是这种情况(我知道是这种情况,因为您已经说过),那么您可以尝试挑选您恢复的原始修订版(不确定它是否会起作用,因为修订版是当前历史的一部分分支)......或恢复反转修订......不优雅,但应该工作。
推荐阅读
- javascript - 如何在 Phaser 3 中将数据从一个场景传递到另一个场景?
- c++11 - Qt:QObject::connect:没有这样的插槽
- powershell - 等待其他会话中的多个同时执行的 powershell 命令完成,然后再运行下一个命令
- web-scraping - 如何修复 yaml 文件中的“在此上下文中不允许映射值”错误?
- php - 测试父方法时存根子方法失败
- excel - 对数据进行排序后,我可以在 Excel 中将多行合并为一行吗?
- java - 如何在动态添加到 JMenu 的 JMenuItem 中添加动作侦听器
- ruby-on-rails - 使用 Rails / ADFS 集成 gem omiauth-wsfed 的问题
- java - java.security.InvalidKeyException:错误的密钥大小 DESede 加密
- python - 在一列中更改日期格式(替换、插入列、追加),有什么方法可以更新吗?..它必须很简单