Spot Rebase Mistake
找错误 中等
题目
某人运行这个 on shared 分支. 什么是 problem?
代码
git rebase main # on a branch that others have already pulled
提示
从不 rebase shared 分支.
解释
Rebasing rewrites 提交 hashes. 如果 others 有 already pulled 分支, 它们的局部提交将 有不同 hashes 从你的 rebased version, causing conflicts and duplicated 提交. golden 规则: 从不 rebase 分支那个 others 有 already 检查 out. Use 合并相反 for shared 分支.
相关资源
相关课程
相关速查表
查阅不认识的术语
新手友好的术语表用大白话解释编程术语——变量、函数、DOM、Promise 等等。
解读错误信息
用大白话解释常见错误——什么意思、为什么发生、如何修复。
动手做项目
通过引导式项目应用所学,含起始代码与解决方案。