如何在不影响工作目录的情况下进行"hg合并"? [英] How to 'hg merge' without affecting the working directory?

查看:113
本文介绍了如何在不影响工作目录的情况下进行"hg合并"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设:

  • 我有一个名为MyRepo的存储库.
  • 我的工作目录中未提交更改.
  • 我从Repo1提取数据,并在MyRepo中创建了一个分支
  • 我想将我回购中已经拥有的东西与我刚刚提取的东西进行合并.

此处所述,工作目录.

As described here, the merge process changes the state of the working directory.

在我的场景中,我不想丢失工作目录中未提交的更改,因为在那一点上,我有兴趣更改MyRepo的状态.不是我的工作目录的状态.

In my scenario, I don't want to loose the uncommitted changes that are in my working directory because at that point, I'm interested in changing the state of MyRepo; not the state of my working directory.

是否有一种方法可以完成合并过程,包括手动解决冲突,而又不影响我的工作目录的内容?只能在临时文件中执行此过程吗?还是我应该搁置更改,进行合并,然后搁置以将我的工作目录恢复到合并之前的状态?

Is there a way to go through the merging process, including resolving conflicts manually, without affecting the content my working directory? Can this process be done in temporary files only? Or should I shelve my changes, do the merge and then unshelve to restore my working dir to the state it was before the merge?

推荐答案

使用搁置 attic 扩展名,可以在合并时临时存储您的更改.

Use shelve or attic extensions to temporarily stash your changes while you merge.

这篇关于如何在不影响工作目录的情况下进行"hg合并"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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