水银樱桃采摘更改提交 [英] Mercurial cherry picking changes for commit

查看:68
本文介绍了水银樱桃采摘更改提交的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

说,我对代码进行了许多更改,只需要提交其中的一些更改即可.有没有办法做到这一点?我知道darcs具有这样的功能.

Say, I made many changes to my code and only need to commit a few of those changes. Is there a way to do it in mercurial? I know that darcs has a feature like this one.

我知道hg transplant可以在分支之间执行此操作,但是我需要类似的东西来在当前分支中提交代码,而在从其他分支添加更改集时不需要.

I know hg transplant can do this between branches, but I need something like this for committing code in the present branch and not when adding change sets from some other branch.

推荐答案

MQ是一种方法.还有更轻巧的解决方案:

MQ as Chad mentioned are one way. There's also more lightweight solutions:

  • 记录扩展,其功能与darcs记录大致相同.它与水银一起分发.
  • 扩展扩展名,该扩展名使您可以扩展"某些更改,从而可以仅提交更改的一部分(未搁置的更改)
  • Record extension which works roughly the same way as darcs record. It's distributed with mercurial.
  • Shelve extension which allows you to "shelve" certain changes, allowing you to commit only a subset of your changes (the ones that are not shelved)

这篇关于水银樱桃采摘更改提交的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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