Git vs SVN comparison

Version 30 (kju, 04/29/2009 14:37) → Version 31/42 (kju, 04/29/2009 15:05)

h1. Git vs SVN comparison


h2. Summmary

Overall SVN easier to get into and is more accessible due to the
excellent app called "TortoiseSVN": (TSVN).
It is a GUI tool that allows you easy execution of all important
standard workflow commands via good explorer integration.

Git has a not yet such excellent tools.
However "TortoiseGit": (TGit) is in heavy and rapid development.
Git GUI, part of the standard windows git package, and especially
the all-in-one package gitExtensions are work well.

For experienced devs, check "WhyGitIsBetterThanX": for an advanced
high level, brief and still extensive summary and comparison.

h2. Git

h3. Pros of git

* Upload and download takes less time due to very good compression.
* Overall very fast command execution (better in performance).
* You commit to your local repository first. This means you can commit
very fast without normal wait times. No need to have Internet connectivity.
You do the upload to the server of several commits in one go.
* *Git Bash* gives you the option to work in a Linux command shell.
Allows some nice advanced use (mass delete / rename etc) and
very fast typing.
* Tools:
** *Git GUI* has most of the needed git command available easily via key shortcuts.
The app is fast and the UI is fine.
** *GitExtension* has a nice all-in-one installer making it easier to install.
Key shortcuts missing and bit complicate multi window design, yet has easy
access to very very many git commands and settings.
* No messing with SVN folders (no .svn folder in each folder).
All the files of the local repository are in one .git folder
in the top most level.
* You can just remove or rename files via explorer (no extra
rename/delete command needed) (as git tracks content not files).

h3. Cons of git

* There is a transition phase when coming from SVN. Different wording,
to a degree different workflow, more complex.

h3. Recommended videos

* "GitCasts: Git on Windows": 13 minute screencast.
Nice straight forward introduction to git; installing git on windows,
using git GUI. Needs basic understanding of VCS.
* "Distributed Version Control with Git": 50 minutes screencast.
Explains VBS in general, pros of distributed ones and
* "Git Overview Demo (commits, branches, merging, apps)": 30 minutes screencast. Quite nice video
explaining in detail and easy to understand how to do
the basic operations on command line. Great way to get
into the basic workflow and possibilities of VCS.
Also show *git GUI* briefly.
* "git-gui screencast": 6 minute screencast.
*Explains basic workflow of git GUI* and *shows how to*
*stage and commit single line(s)*.
This allows small, atomic commits easily! No longer worry
about changing several aspects at the same time.
*You can sort the commits later on smoothly with this*.
* GitExtension videos tutorials:
** "1 Clone - Git Extensions":
** "2 Commit changes":
** "3 Push changes":
** "4 Pull changes":
** "5 Handle merge conflicts":
* "Hasan on GIT": 20 minutes recording of git presentation.
Fair job and bit more interactive and fun due the present audience.
* "RailsConf Git Talk": 55 minutes screencast.
By schacon - *extremely well done and very extensive*!


These are all command line based videos explaining the basics of git throughly.

* "GitCasts: Normal Workflow": 5 minute screencast.
This episode demonstrates how to setup your .gitignore file, how to use and
interpret git status output, how to add and remove files from your index,
how to commit and what git does in the object database during these operations.
* "GitCasts: Setup, Initialization and Cloning": 5 minute screencast.
This episode shows you how to setup your Git configuration, how to initialize
a new repository and how to clone an existing repository over both
the Git transport and the HTTP transport.
* "GitCasts: Git Diff": 9 minute screencast.
This episode goes over some of the common or interesting options to 'git diff',
showing how to see what has changed between your last commit and
your staged files, unstaged files, all changed files or another commit.
We also demonstrate how to create and apply patchfiles and
how to view changed file stats using diff.
* "GitCasts: Git Log": 6 minute screencast.
This episode is on git-log, which demonstrates most of the major features and
options to the git-log command. It includes showing the stat, short-stat and
name-stat options, the pretty options, the since and until limiters, the path
limiter and author field searching.
* "GitCasts: Interactive Adding": 4 minute screencast.
This episode demonstrates how to use the git interactive add command.
It covers all of the major features of interactive adding, including status,
update, revert, add untracked, patch and diff.


* "GitCasts: Branching and Merging": 9 minute screencast.
In this screencast, we take you through a workflow where we branch, stash and
merge several times. It demonstrates the branch and show-branch commands,
how to switch branches, how to stash changes, how to list and apply stashes,
how to resolve conflicts, how to create and delete topic branches,
and what fast-forward merges are.
* "GitCasts: Rebasing": 10 minutes Screencast.
This screencast follows roughly the same course as the previous one on
branching and merging, only I replace merging with rebasing.
This screencast also demonstrates the interactive rebase command git rebase -i.
I also demonstrate some slightly more complex branching, by using both
interactive and normal rebasing techniques simultaneously on separate branches,
then choosing one and deleting the other.
* "GitCasts: Git Submodules": 15 minutes Screencast.
Needs submodules concept understanding!
Shows use of submodules quite extensively and well presented.
* "GitCasts: Browsing Git Objects": 7 minute screencast.
In this episode, I show how to browse and inspect raw Git objects.
The major tools covered are the git cat-file and git ls-tree commands to
inspect the object contents, and then I cover some of the included graphical
browsers, gitk and gitweb.
* "GitCasts: Distributed Workflow": 14 minutes screencast.
This screencast demonstrates a distributed workflow. It takes two personas,
creating a project in GitHub and pushing to it in the first persona, then
cloning that project in the second. The second sets up a public, read-only
HTTP repository on his own server. The first then fetches from that, merges
changes and pushes back to GitHub. It also demonstrates an instance in which
the Author and Committer fields can differ for a commit.

h3. Links

* "Git home":

* "Git Community Book": Welcome to the Git Community Book.
This book has been built by dozens of people in the Git community,
and is meant to help you learn how to use Git as quickly and easily as possible.
* "GitFaq": Official FAQ. Lots of good info.
* "GitTips": Many useful tips.
* "GitReady": If you're looking for pointers (no pun intended) on how to use git,
look no further! The goal with this site is to make it usable as a way for beginners to get off
the ground using Git and to show those who are already familiar with Git some new tricks.

* "Git bash aliases": With aliases, you can avoid typing
the same commands over and over again. Since version 1.5.0,
Git supports aliases executing non-git commands, by prefixing the value with @!@.

* "WhyGitIsBetterThanX": Here is why people are switching to Git from X,
and why you should too. Just click on a reason to view it.

h4. Further reading

* "Djief’s Blog about git": Contains interesting tips.

* "Carl Mercier’s blog: No nonsense GIT, part 1: git-remote-branch":

* "Git-presentations": by schacon
** Basic git talk: "60 minutes screencast version":
High level overview of Git, why people use it, comparisons to SVN (including benchmarks), then a rundown on basic usage
- setting up, workflow (edit/add/commit), what's happening behind the scenes, branchingand merging, log, diff, etc.
About 1 hour if you talk as fast as I do and there aren't any questions, but it's taken me close to 2 hours before with
a chatty audience.
** Git world economy talk:
This is a short, 30 minute or so talk that I tend to give at larger companies that is very high level and fast paced,
intended to convince people to move their personal and company open source projects to Git and GitHub. This talk is
about half high level Git evangelization, then half GitHub evangelization.
** RailsConf08:
The first big talk I gave on Git in early 2008. There are over 500 slides here, but I gave them fairly easily in about
45-50 minutes. I did a screencast of this deck, so you can see the presentation being given (url in the readme in that
subdir). It introduces basic Git concepts, starting from the internals, then goes over all the porcelain you use most
often. This is a bit old (pre 1.6), it still assumes you have all the executables in your path rather than in libexec,
and I've since moved away from talking about internals off the bat (Basic Git Talk still goes over some internal
concepts, but much more gently and farther into the presentation, I think.
** Sor09:
This is the talk I gave at Scotland on Rails in 2009. It has a lot of the Basic Git Talk, plus a number of advanced
commands (revision selection, bisect, rebasing, etc). It is a large deck, over 500 slides - it will take at least 2
hours to get through. I did 80% of it in 45 minutes, but I was in overdrive., One could easily split it into two
shorter presentations.

h4. Handy extension

* "Git Remote Branching": git remote branch is a simple command-line tool
that makes it very easy to manipulate branches published in shared repositories. Very useful script written in Ruby.
Can be used to simplify managing remote branches (create, track or remove)
* "Experimental Client - NetBeans Git Plugin": This is only a wrapper,
you still require a git implementation (MSYS/CygWin).

h4. Non dev heaven related git tools

* "Howto use Git and SVN together | Flavio Castelli": Use git local with a SVN server.
* "Secure source code hosting and collaborative development - GitHub": : Free/commerical git repository hosting.
* "Gitorious": Free git repository hosting.
* "9$ screencast by Geoffrey Grosenbach on peeopcode":

h2. Subversion (SVN)

h3. Pros

h3. Cons

h3. Recommended videos

* "TortoiseSVN (Subversion) for local use:
Short and good for non IT people. Summarizes the basic workflow.
** "Part 1": 4 minute screencast.
Topic: Baisc introduction to VCS and basic install guide for TSVN.
** "Part 2": 6 minute screencast.
Topic: The basic checkout of a repository.
** "Part 3": 6 minute screencast.
Topic: Organization, create basic directory structure.
** "Part 4a": 8 minute screencast.
Topic: Checkout and add files.
** "Part 4b": 4 minute screencast.
Topic: Checkin or committing files to the repository.
** "Part 5": 9 minute screencast.
Topic: Version of files, commit comments.
** "Part 6a": 6 minute screencast.
Topic: Version number for files, SVN log and file history.
** "Part 6b": 6 minute screencast.
Topic: Basic intro to the concept of branching and how to create them in TSVN.

* "Installing Subversion": 6 minute screencast.
Nice basic install guide and intro to TSVN for non IT people.
* "Basic SVN": 13 minutes screencast. Basic intro to Tortoise SVN,
and some of the basic function that should be used when working on a project.
* "Tutorial: using tortoisesvn, subversion on windows": 20 minute screencast.
Nice introductory tutorial on subversion using tortoisesvn covering creating
a repository, checking in, merging and some basic version control issues.
* "Learning how to resolve conflicts within Subversion (SVN) using TortoiseSVN":
6 minute screencast. Nice short video explaining conflicts and how to resolve them with TSVN.
* "Tutorial SVN": 3 minute screencast.
Explain in French how to setup a repos with TSVN.


* "Best Practices for Subversion (SVN)": 8 minute screencast.
Somewhat confusing as voice and text are not properly linked. Fair idea to listen
to voice *only* first and watch it a second time without sound.
That said good video sharing some thoughts about standard SVN directory structure
and directory design, updating, commit logs and binary file handling in SVN.
* "Creating a Branch in SVN with TSVN": 3 minute screencast.
Short, nicely explained and well done.


* "Apache and TortoiseSVN": 20 minutes screencast.
In case you want to setup your own SVN repository on a server with apache.

h3. Links


* "TSVN @ wikipedia": Short and good feature summary.
* "TSVN home site": Features of TSVN section contains many links to
pictures to give you an good idea of the tool and its look.


* "svnbook":