git相当于hg mq? [英] git equivalent to hg mq?

查看:184
本文介绍了git相当于hg mq?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我在Mercurial中广泛使用mq扩展来管理本地修补程序,我正在寻找一个Git等价物。



我应该只使用Git分支吗?或者是否有更好的方法来管理本地补丁,以便轻松应用和删除补丁?

谢谢,

解决方案

查看 Git Wiki上的接口,前端和工具页面。这里列出了两个补丁管理界面,大致相当于Mercurials的mq'扩展名


  • StGIT (Stacked Git),用Python编写的两个较老的版本,使用两个快照来表示补丁

  • 内疚(以前的'gq'),写成bash系列脚本,系列文件和补丁(每个文件一个)以纯文本文件的形式存储。



但是如果你不需要更高级的用法,你可以用 git rebase --interactive 重新排序,挤压和分割补丁。为了管理你的分支与当前版本的上游,git rebase通常就足够了。


I just started using Git alongside Mercurial to familiarize myself with Git.

I use the mq extension in Mercurial extensively to manage local patches, and I'm looking for a Git equivalent.

Should I just use Git branch? Or are there better ways to manage local patches that enable easily applying and removing the patches?

Thanks,

解决方案

Check out "Patch-management Interface layers" section of Interfaces, Frontends And Tools page on Git Wiki. There are listed two patch management interfaces, roughly equivalent to Mercurials 'mq' extension:

  • StGIT (Stacked Git), older of the two, written in Python, uses two snapshots to represent patch
  • Guilt (formerly 'gq'), written as series of bash scripts, series file and the patches (one per file) are stored as plain text file.
  • pg (Patchy Git) is deprecated, and no longer maintained.

But if you don't need more advanced usage, you can use instead "git rebase --interactive" to reorder, squash and split patches. And to manage your branch against current version of upstream, "git rebase" usually would suffice.

这篇关于git相当于hg mq?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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