Search code examples
gitmercurialmercurial-queue

git equivalent to hg mq?


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,


Solution

  • 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.