Git 错误的提交父级
我刚刚提交了对分支上的项目所做的一些更改,我发现 git 为我的提交分配了错误的父级。
正如您所看到的:
tig 向我展示了突出显示的提交(今天在当前分支上完成的提交)消息登录后重定向用户
)来自两天前完成的合并,这是错误的,因为如果我签出feature-loose-logging
分支,我看不到该提交那里。
所以我的提交应该放在添加许可证
提交之后。
为什么 git 选择在 feature-loose-logging 分支上分配父分支?
I was just commiting some changes I've done to a project on a branch and I discovered that git assigned the wrong parent to my commit.
As you can see:
tig shows me that the highlighted commit(the one that was done on the current branch TODAY with the message redirect user after login
) comes from a merge done two days ago, which is wrong because if I checkout the feature-loose-logging
branch I can't see that commit there.
So my commit should have been placed right after added license
commit.
Why does git chose to assign a parent on the feature-loose-logging
branch?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你错了,tig 没有向你显示“突出显示的提交来自两天前完成的合并”。请更仔细地检查图表。
You are wrong, tig doesn't show you that "the highlighted commit comes from a merge done two days ago". Please examine the graph more carefully.