4 ms·
> Mercurial is much easier to understand and use than git I simply do not find this to be true. I've used git for years and tried to use hg to participate in
by radarsat1 8y ago
> Mercurial is much easier to understand and use than git
I simply do not find this to be true. I've used git for years and tried to use hg to participate in a project and I straight-up just could not understand its branching model and how exactly I was supposed to use that tool. I ended up maintaining my work in a git repository and very carefully doing individual commits and a push in the hg repository only at the very end of a long work period. My daily work remained in git because I could not for the life of me understand how people work with that tool with regards to local branches and squashing. (Which, sorry, I cannot do without.)
- shakna 8y ago> I ended up maintaining my work in a git repository and very carefully doing individual commits and a push in the hg repository only at the very end of a long work period. My daily work remained in git because I could not for the life of me understand how people work with that tool with regards to local branches and squashing. Local branches are fairly simple - use the phase command to mark your changesets as secret. As for squashing... It's more complex, and not so easy, though doable, because Mercurial discourages it. (Though the solutions are on their wiki [0], and various extensions can simplify it for you.) [0] https://www.mercurial-scm.org/wiki/ConcatenatingChangesets https://www.mercurial-scm.org/wiki/ConcatenatingChangesets
- marcinkuzminski 8y agoUse Mercurial histedit extension, this is a game changer on all operations. Works like git rebase -i but just better combined with phases. So most likely your not-yet-pushed commits are marked as draft, so you can run hg histedit. We use this ALIAS: histamend = !$HG histedit $(hg log -l1 -r '(draft() or secret()) and branch(.)' --template={rev}) This shows you option to drop/squash re-order/edit messages on all draft or secret commits in the current checkout branch
- eire1130 8y agoOr just use evolve + topics and you can squash/fold in pretty much the same way as git, plus you hg obslog you can still reference the root commits.