- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
假设我有 2 个分支topic
和 master
如果我在 topic
分支,然后运行 git rebase master
它是 rebase master 还是 rebase 主题分支?
做 git rebase --help
给了我这个
假设存在以下历史记录并且当前分支是“主题”:
A---B---C topic
/
D---E---F---G master
git rebase master
git rebase master topic
A'--B'--C' topic
/
D---E---F---G master
D---E---F---G---A---B---C master
, 我应该切换到 master 并运行
git rebase -i topic
?
git rebase -i topic
尝试将 A、B、C 压缩为 C 以成为
D---E---F---G---C master
, 我得到
noop
最佳答案
假设你从一棵看起来像这样的树开始
A---B---C topic
/
D---E---F---G master
git rebase master
让它看起来像这样
A'--B'--C' topic
/
D---E---F---G master
master
运行
git merge topic
,这将进行快进 merge ,您最终会得到一棵看起来像这样的树
topic
/
D---E---F---G---A---B---C -- master
Can I just checkout master and run git rebase topic??
topic
/
D---A---B---C---E---F---G -- master
rebase
的(稍微编辑过的)git 文档,希望这会有所帮助:
All changes made by commits in the current branch but that are not in upstream are saved to a temporary area.
topic
并运行
git rebase master
,这意味着提交 A、B 和 C 将进入临时区域。
The current branch is reset to upstream. This has the exact same effect as git reset --hard upstream.
topic
/
D---E---F---G -- master
The commits that were previously saved into the temporary area are then reapplied to the current branch, one by one, in order.
topic
.
topic
/
D---E---F---G---A---B---C -- master
git rebase topic
来自
master
将执行完全相同的步骤,除了不是将提交 A、B、C 放入临时区域,而是将提交 E、F G 放入临时区域。
关于git rebase 混淆,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11979414/
所以通常当我使用 IDA 调试时我不会遇到任何问题;然而,对于这个特定的进程(模块之前的大小为 9.9 MB),IDA 坚持每次启动该进程时都会重新设置基准,这会卡住 IDA 并迫使我在它真正启动之前
在 git rebase -i 的正常过程中看起来像这样(=> 表示终端命令提示符): => git logg * 7bec976 (HEAD -> develop, origin/develop)
我正在用几个分支尝试一些东西,所以我重新基于一个临时分支并且在解决一些冲突时我决定不以另一种方式完成重新设置它。然后我删除了涉及的临时分支并继续我的快乐方式。几个小时后,我想 rebase 另一个分支
我有一个本地分支机构,我们称它为 DEV。分支提交历史如下所示: module_A: 添加CRC校验(9273467932) module_B:更改关机程序 (84705723) merge 来自 X
是否有任何常见的 git 使用错误或一般的任何原因,如果这些冲突已在先前的 rebase 中全部解决, rebase 会重复来自先前 rebase 的冲突? 此外,rebase 是否优先于如何解决冲突
我们遇到了一个问题,如果你rebase你的分支在master之上然后push,另一个在你的分支上工作的人pull s 和 gets 各种合并冲突,因为 rebase 重写了历史并且提交与分支上的提交不
我们遇到了一个问题,如果你rebase你的分支在master之上然后push,另一个在你的分支上工作的人pull s 和 gets 各种合并冲突,因为 rebase 重写了历史并且提交与分支上的提交不
我注意到如果我做一个 git rebase -i HEAD~10 然后不要更改结果文件中的任何内容,仍然会执行某种 rebase 。 IE。我需要 git push origin branch --f
场景: 我正在与一个 20 多人的团队一起开发远程 git 存储库。经常创建、提交和 merge 分支以掌握。 我和一位同事在一个分支机构一起工作了几天。他重新定位分支,解决所有冲突并 push 。
出于某种原因,运行 git rebase 突然没有 rebase 我的整个分支,我无法想象为什么。在 rebase 之前我有以下内容: 运行 git rebase develop 后我得到的是: 请注
我的 git 分支看起来像这样: master-*-*-*-*-*-*-implement_x \ \-*-further_foo_fixes_that_dep
人们常说,您不应该对已经推送的提交进行 rebase 。那是什么意思? 最佳答案 要理解这一点,我们需要了解一下 git 的工作原理。 git 存储库是一个树结构,其中树的节点是提交。这是一个非常简单
在过去的几天里,我一直在研究使用 Git 进行 rebase 。大多数支持 rebase 的论点都说它清理了历史并使其更加线性。如果你进行普通 merge (例如),你会得到一个历史记录,显示历史记录
最近,我在更改提交消息的同时对仅限本地的存储库进行 rebase 取得了很大的成功,之后只有提交消息被更改,但历史本身没有。 现在我有了自己的存储库 - 远程和本地。我在几个分支上做了几次提交并且已经
我在我的功能分支 my-feature ,我运行 rebase develop 分支: (my-feature)$ git rebase develop 终端显示一堆冲突,在detached现在模式:
总结 在当前分支中找到还包含在任何其他分支中的最新提交的最快方法是什么? 奖励:该技术能否允许上述问题中的“任何其他分支”成为“任何其他远程分支”或“任何其他本地分支”? 背景 我喜欢使用 git r
interactive rebase 有什么不同,比如: git rebase -i HEAD~3 并且在没有 -i 的情况下 rebase : git rebase HEAD~3 最佳答案 正如 T
这是我在重新设置当前分支的基础同时防止本地分支变平时通常做的事情: git fetch origin git rebase -r origin/develop -r 是 --rebase-merges
我正在同时处理两个功能,“feature1”是“feature2”的基础。我为他们创建了两个分支;当我在 feature1 上工作时,我提交到“feature1”分支;当我在 feature2 上工作
当我读到 git-rebase 时,我知道重新设置的提交应该丢失。我说应该是因为我注意到,知道 rebased 提交 sha,我可以记忆起它。 假设我有以下三个提交 A -> B -> C C 的 s
我是一名优秀的程序员,十分优秀!