Git vs Mercurial vs SVN

Possible duplicates:
For home projects, can Mercurial or Git (or other DVCS) provide more advantages over Subversion?
What are the relative strengths and weaknesses of Git, Mercurial, and Bazaar?

What are some differences between these version control systems? Which one is best for a small project of 2 people?

+41
git version-control svn mercurial
Jul 06 2018-10-06T00:
source share
3 answers

SVN differs from Git and Mercurial in that it is the only repository that all users must retrieve and commit.

Git and Mercurial have a distributed model. This means that every computer has a repository, and usually there is an โ€œofficialโ€ repository that people will choose to make changes and check out.

Git and Mercurial are extremely similar. I prefer Mercurial because I found it much easier to use. For a group of 2 people, I would recommend Mercurial, but this is just my opinion. If you are not familiar with version control, you still have to spend time exploring any of the options, but Mercurial seemed to me the easiest.

To start the Mercurial repository, you need to open the shell and the CD in the directory in which you want to have version control, and type hg init . This creates a repository. To add everything to a folder in the repository, type hg add . . Here are a few other commands:

  • To commit local changes: hg commit -m "Descriptions of changes"
  • To upgrade to the latest version from the server: hg pull
  • To make local changes: hg push
+44
Jul 06 2018-10-06T00:
source share
โ€” -

To begin with, in what language they are written. My experiences with Git and Mercurial were very similar, but I know that if I want to configure Mercurial, I can do this because it is written in Python, Git is at least somewhat in C, which I am not familiar with.

Git and Mercurial are what are called distributed. Each copy is created in the same way, and they can push and pull (using this terminology), change from each other on a one-time basis. Subversion, on the other hand, consists of one central repository, and each working copy is subordinate to this central server, clicking and pulling out (fixing and updating in this case) changes it and only in it.

Installing Git or Mercurial for a couple of people consists of gaining SSH access to the same server and installing multiple packages. While for SVN, as far as I know, you need to configure and run the actual server application under Apache, and then contact the SSL certificate and .htaccess, etc., to protect it.

For all my personal projects I go with Mercurial or Git. If I worked with a large team, I would probably go Subversion, because you get centralized authentication and hosting. But for two people I would choose one of the distributed ones, because then you do not need to bother with centralized authentication and hosting. :-)

+15
Jul 06 '10 at 2:02
source share

Git and Mercurial are very similar (but distinct enough to guarantee caution). SVN, on the other hand, is very different: the first two are distributed VCS, so they do not require a central server, but SVN. In general, many projects are moving towards distributed systems.

For your small project, you're probably better off with Git or Mercurial. Which one you choose is, in fact, a matter of taste, although I prefer Git itself (and am much more familiar with it). You donโ€™t have to configure the server at all: you can push / pull changes through SSH or even send patches by e-mail to each other (this can be done directly from VCS, but this is kind of a hassle). You can set up a central server at any time, and all changes will be there. You can use for example. GitHub or Gitorious to host your project (if you are building with Git, I don't know about Mercurial).

+6
Jul 06 2018-10-06T00:
source share



All Articles