在 IntelliJ 中使用 Git 时,如何压缩本地分支的所有提交?我在变基分支窗口中使用哪些设置?
我尝试将 Onto 设置为 local/master,将 From 设置为我的分支,但随后它会尝试将主更改合并到我所做的每次提交的分支中,尽管我通常每天早上都会将我的分支重新设置为主分支...所以不应该有冲突。然而它几乎总是会发现冲突并导致合并问题。我只想压缩分支提交和消息,因此当我推送到 GitHub 时,它只看到一个。
可能有点不舒服但是可以用HEAD的git表示法~
因此,在“Onto”字段中,您可以写下您想要包含的提交数量
喜欢:
在此示例中,我有 4 个(最后 4 个)提交,我想将其合并为 1 个。
In the opening dialog the entries are listed in order, so you need
to squash all after the first one with the drop box. (I made the first
a reword but that's not needed as there will be a message-change dialog
for the squashing anyway, so it can be left on 'pick')
then just a new message for the combined commits and you're done.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)