Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>"<a href="http://whygitisbetterthanx.com/#svn" rel="nofollow noreferrer">Why Git is Better than X</a>" outlines the various pros and cons of Git vs other SCMs.</p> <p>Briefly:</p> <ul> <li>Git tracks <strong>content rather than files</strong></li> <li><strong>Branches are lightweight</strong> and merging is <em>easy</em>, and I mean <em>really easy</em>.</li> <li>It's distributed, basically every repository is a branch. It's much easier to develop concurrently and collaboratively than with Subversion, in my opinion. It also makes <strong>offline</strong> development possible.</li> <li>It <strong>doesn't impose any workflow</strong>, as seen on <a href="http://whygitisbetterthanx.com/#svn" rel="nofollow noreferrer">the above linked website</a>, there are many workflows possible with Git. A Subversion-style workflow is easily mimicked.</li> <li>Git repositories are much <strong>smaller in file size</strong> than Subversion repositories. There's only one ".git" directory, as opposed to dozens of ".svn" repositories (note Subversion 1.7 and higher <a href="http://subversion.apache.org/docs/release-notes/1.7.html#wc-ng" rel="nofollow noreferrer">now uses a single directory</a> like Git.)</li> <li>The <strong>staging</strong> area is awesome, it allows you to see the changes you will commit, commit partial changes and do various other stuff.</li> <li><strong>Stashing</strong> is invaluable when you do "chaotic" development, or simply want to fix a bug while you're still working on something else (on a different branch).</li> <li>You can <strong>rewrite history</strong>, which is great for preparing patch sets and fixing your mistakes (<em>before</em> you publish the commits)</li> <li>… and a <em>lot</em> more.</li> </ul> <p>There are some disadvantages:</p> <ul> <li>There aren't many good GUIs for it yet. It's new and Subversion has been around for a lot longer, so this is natural as there are a few interfaces in development. Some good ones include <a href="http://code.google.com/p/tortoisegit/" rel="nofollow noreferrer">TortoiseGit</a> and <a href="http://mac.github.com/" rel="nofollow noreferrer">GitHub for Mac</a>.</li> <li><del>Partial checkouts/clones of repositories are not possible at the moment (I read that it's in development). However, there is submodule support.</del> <a href="http://www.kernel.org/pub/software/scm/git/docs/RelNotes-1.7.0.txt" rel="nofollow noreferrer">Git 1.7+ supports sparse checkouts</a>.</li> <li>It might be harder to learn, even though I did not find this to be the case (about a year ago). Git has recently improved its interface and is quite user friendly.</li> </ul> <p>In the most simplistic usage, Subversion and Git are pretty much the same. There isn't much difference between:</p> <pre><code>svn checkout svn://foo.com/bar bar cd bar # edit svn commit -m "foo" </code></pre> <p>and</p> <pre><code>git clone git@github.com:foo/bar.git cd bar # edit git commit -a -m "foo" git push </code></pre> <p>Where Git really shines is branching and working with other people.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload