Search code examples
version-controlmergemercurialcommittortoisehg

Mercurial - merging last three unpushed commits


I have (locally) three hg commits. As two of them are basically but a couple of minor corrections, I would like to merge them into a single commit prior to pushing.

Any way to do that (with TortoiseHg or console)?


Solution

  • You can use the 'histedit' extension for this. To activate it, add the following to your hgrc:

    [extensions]
    histedit =
    

    If these are the only unpushed changesets, you can use hg histedit --outgoing.

    Once in the histedit interface, 'fold' will be a useful action for you (it allows combining your changesets).