5 ms·
The answer to (a) and (b) might be Mercurial. Each of its commands does one thing well. You combine them to do more complicated things. (Core) Mercurial basic
by stevelosh 16y ago
The answer to (a) and (b) might be Mercurial. Each of its commands does one thing well. You combine them to do more complicated things.
(Core) Mercurial basically has three concepts: repository, changesets (commits), and working directory.
A repository holds changesets.
You make new changesets by making your working directory look how you want it to and using 'hg commit'.
You can "move around" the DAG with 'hg update'.
You create a branch by committing while you're at a changeset that happens to already have a child (or several). You can use a label for the changesets on the branch (also called a "named branch" by Mercurial users) by running 'hg branch' first, if you like.
You can merge branches with 'hg merge'.
You move changesets between repositories with 'hg push' and 'hg pull'.
There are a lot of extensions that add more features if you need them, but vanilla Mercurial has the cool things you talked about.
It's safer than git -- there is no history rewriting built in except for the 'rollback' command, which is a one-step "undo" command. Once a changeset is in a repo it's there for good. There's no deleting of branches in a remote repo, no rebase --interactive, etc.
It's also cleaner than git. For example, in git you can move to a different place in the DAG and create a new branch with 'git checkout -b foo SOMEREV'. With Mercurial you use two commands, each of which does a single thing: 'hg update' to move to the new position, and 'hg branch' to start a named branch.
http://hg-scm.org/ http://hg-scm.org/