

Ask HN: Git or Mercurial for beginning students? - klancaster

I regularly teach Git to students at the senior level that are building RoR applications. Even though we only cover the basics, they seem to struggle quite a bit with both the concepts and the mechanics. They are on Windows for the most part, and are required to push their code to Bitbucket. The seniors have suggested that I introduce the topic much earlier in the curriculum in a sophomore level Java class. The students in that class have had one prior programming class, but generally are still struggling with the basics. I&#x27;ve been thinking about using Mercurial at the sophomore level instead of Git to see if that eases the introduction to the concepts. Any thoughts one way or the other?
======
dozzie
I guess that they are simply not accustomed to work in command line, given
that Windows gives terrible terminal and shell. I would rather expose them to
Linux (or maybe BSD), possibly through providing them shell accounts on some
server and requiring code to be built primarly there. Then it should not be
too difficult to jump from working with files in command line to working with
version control in the same command line.

~~~
jotux
>given that Windows gives terrible terminal and shell

Though the command set is a little verbose I think powershell is pretty nice.
If you get posh-git([https://github.com/dahlbyk/posh-
git](https://github.com/dahlbyk/posh-git)) and use powershell it makes the git
experience on windows quite pleasurable.

~~~
dozzie
> Though the command set is a little verbose I think powershell is pretty
> nice.

Last time I checked, PowerShell made more or less sensible programming
language, but was awful in term of command completion. If that hasn't changed,
it is still a terrible shell.

~~~
jotux
The commands themselves are verbose but I've never had a problem with
completion. Can you highlight some problems you had?

------
senjindarashiva
Last time I checked mercurial has better windows-support and tooling. And
since the concepts generally is the same they should have no issue learning
git later on if the need it.

[http://tortoisehg.bitbucket.org/](http://tortoisehg.bitbucket.org/)

~~~
klancaster
The windows support was one of the issues that I was considering. I think you
are right that it is a bit better than Git from that standpoint.

------
theaccordance
On whether to use Git or Mercurial, my gut suggests you teach Git, but if you
have the ability, poll alumns of the program and/or companies who are nabbing
grads to see what they have/haven't used. Personally, I've never been around
an environment that uses Mercurial, but that's just my particular situation.

Also, the basics of version control should be taught in the very first
programming class. You can then expand on the basics in further courses.

~~~
klancaster
My gut has been Git as well, since I have always used it in commercial
development. My guess is that the companies the students are going to use
Perforce or a commercial tool since most end up in energy / oil related
companies that tend not to use open source at all. That said, I'll see if I
can get more info on what they are using. I don't have control over the first
class they take (yet) but I do agree with getting them started early. Most of
the programs (CS,EE, etc.) don't even teach version control at all at the
undergrad level, so I am doing what I can to remedy that issue.

------
japhyr
Are you talking about high school students?

~~~
klancaster
Sorry - should have been clearer. These are undergrads in a 4 year bachelor of
science technology program. They are not CS majors, so they have limited
programming background in general.

