[Gllug] Mercurial or Subversion for single user?

Matthew King matthew.king at monnsta.net
Tue Mar 23 09:10:42 UTC 2010


gvim <gvimrc at googlemail.com> writes:

> I'm looking to start using a revision control system for my work which usually involves:
>
> - Work at home on code project
> - rsync to laptop
> - Take project away on laptop at weekend
> - Return and rsync back to desktop
>
> Subversion, Git and Mercurial seem to be the most popular but a
> cursory glance at Git suggests it's well beyond what I need so that
> leaves Subversion and Mercurial. Subversion is client/server whereas
> Mercurial is distributed but the distinction may not be relevant in a
> single-user scenario. I read Subversion has/had some renaming issues
> but didn't delve into it too deeply.
>
> So, what would be the best option. I'm inclined to go with Mercurial
> at this stage.

If you've already discounted git, then stick with Mercurial. Subversion
is awful. And before any subversion fans give me grief, Linus says
Subversion is awful and Linus is God, therefore subversion is awful.

Right?

Personally I'd go with git though because 1) git is simple, 2) it has a
nice name, and 3) it's what I know.


Git has its own method for sharing code among multiple locations, but if
you're careful only to develop on the latest version (which you'd have
to be with any RCS anyway) then rsync is suitable. Personally I'd use
git's own code sharing mechanisms because I don't trust myself to
remember to rsync when I'm supposed to but YMMV. That said, there are
only a few necessary commands:

git init (Start. Only used once.)

git commit
 - git commit -a
    Commit everything
 - git commit -m "foo"
    Don't ask you to edit a commit message - use foo

That's the bare minimum, really. Other useful commands:

git mv foo bar
  Analog of mv foo bar

git rm foo
  Analog of, you guessed it, rm foo

git add bar
  Opposite of git rm


git status and git diff are also a handy way to see what's going on.


Then there's branches, rollbacks, partial commits, etc. Still simple but
by no means essential. gitk is also an immeasurably useful tool to
provides a visual indication of your repository's history.

Matthew

-- 
I must take issue with the term "a mere child", for it has been my
invariable experience that the company of a mere child is infinitely
preferable to that of a mere adult.
                                           --  Fran Lebowitz
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list