Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Problem with histedit and rebase though is that they won't allow you to change published history. This means if I want to push my changes to a backup repository (not the main development repository) I loose the option of rebasing my feature-branch before pushing it to the main repo :(


No, problem with git rebase is that it allows you to do this.

Read this part of the git manual:

man git-rebase | grep -P "^RECOVERING" -A200 | less

Phases are actually a feature that git wants (last idea here):

https://github.com/peff/git/wiki/SoC-2012-Ideas

You have some ways you can work with this in hg using phases. One example is to mark the repo you're publishing to as non-publishing so that hg knows it's safe to edit history pushed to that repo. Another way is to just tell hg that you know better and to use "hg phase --force --draft" whatever commits you want to histedit or rebase.


Mercurial's phases are to Git as FreeBSD's jails are to Linux.


Ahh, didn't know about phases. Nice!


Take a look at Phases: http://mercurial.selenic.com/wiki/Phases

What you need is to make your backup repository non-publishing. Just drop these lines in your .hg/hgrc file inside repo:

    [phases]
    publish = False




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: