Tortoise Mercurial - 合并 2 个提交 [英] Tortoise Mercurial - combine 2 commits

查看:31
本文介绍了Tortoise Mercurial - 合并 2 个提交的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开始使用 Mercurial:

1.) 我从公共(中央)存储库(修订版 3029)中提取了最新更新

2.) 处理代码,我做了一个提交 - 修订版 3030

3.) 一些额外的工作,并且 - 我再次提交了 3031.

因此,我的提交 3030 和 3031 都在本地存储库中.在这个阶段,我的本地仓库看起来像这样

中央存储库中没有其他人提交.

到此我已完成,并提交代码进行代码审查 - 我的审查者告诉我应该只有一次提交.我需要在修订版 3030 处摆脱"提交,并保留 3031 修订版.

如果我在修订版 3030 上进行剥离",它会同时剥离 3030 和 3031.(我知道如何从备份中恢复,所以我没有丢失任何东西.我恢复了).

如何使用 Tortoise HG 将修订版 3030 和 3031 合并为一个提交?

解决方案

使用 Rebase.

在变基选项屏幕中选择折叠.

然后会要求您输入新的提交消息.

I am starting to use Mercurial:

1.) I pulled the latest updates from public (central) repository (revision 3029)

2.) Working on code, I made a commit - revision 3030

3.) Some additional work, and - I made another commit 3031.

So, both of my commits 3030 and 3031 are in a local repository. At this stage my local repo looks like this

There are no commits by other people in Central repository.

I am finished at this point, and submit the code for code review - my reviewer tells me that there should be only single commit. I need to "get rid" the commit at revision 3030, and keep the 3031 revision.

If I do "strip" at a revision 3030, it strips both 3030 AND 3031. (I know how to restore from the back up, so I did not loose anything. I restored back).

how can combine revision 3030 and 3031 into a single commit using Tortoise HG ?

解决方案

Using Rebase.

first enable rebase

Then select the bottom/oldest commit, and click rebase.

In the rebase options screen select collapse.

You will be then asked to enter a new commit message.

这篇关于Tortoise Mercurial - 合并 2 个提交的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆