Git vs SVN comparison

Version 37 (kju, 05/16/2010 05:20)

1 1 kju
h1. Git vs SVN comparison
2 1 kju
3 34 kju
{{>toc}}
4 1 kju
5 1 kju
h2. Summmary
6 1 kju
7 1 kju
Overall SVN easier to get into and is more accessible due to the
8 1 kju
excellent app called "TortoiseSVN":http://tortoisesvn.tigris.org/ (TSVN).
9 1 kju
It is a GUI tool that allows you easy execution of all important 
10 1 kju
standard workflow commands via good explorer integration.
11 1 kju
12 35 kju
"TortoiseGit":http://code.google.com/p/tortoisegit/ (TGit) is finally also available and works well.
13 1 kju
Git GUI, part of the standard windows git package, and especially 
14 1 kju
the all-in-one package gitExtensions are work well.
15 1 kju
16 28 kju
For experienced devs, check "WhyGitIsBetterThanX":http://www.whygitisbetterthanx.com for an advanced
17 28 kju
high level, brief and still extensive summary and comparison.
18 27 kju
19 4 kju
h2. Git
20 1 kju
21 4 kju
h3. Pros of git
22 1 kju
23 31 kju
* Upload and download takes less time due to very good compression.
24 31 kju
* Overall very fast command execution (better in performance).
25 31 kju
* You commit to your local repository first. This means you can commit
26 31 kju
  very fast without normal wait times. No need to have Internet connectivity.
27 31 kju
  You do the upload to the server of several commits in one go.
28 31 kju
* *Git Bash* gives you the option to work in a Linux command shell.
29 31 kju
  Allows some nice advanced use (mass delete / rename etc) and 
30 31 kju
  very fast typing.
31 31 kju
* Tools:
32 31 kju
** *Git GUI* has most of the needed git command available easily via key shortcuts.
33 31 kju
   The app is fast and the UI is fine.
34 31 kju
** *GitExtension* has a nice all-in-one installer making it easier to install.
35 31 kju
   Key shortcuts missing and bit complicate multi window design, yet has easy
36 31 kju
   access to very very many git commands and settings.
37 37 kju
** TortoiseGit
38 31 kju
* No messing with SVN folders (no .svn folder in each folder).
39 31 kju
  All the files of the local repository are in one .git folder
40 31 kju
  in the top most level.
41 32 kju
* Very powerful and easy branching. Same for merging.
42 32 kju
* Optimized for massive complex merges.
43 31 kju
* You can just remove or rename files via explorer (no extra
44 31 kju
  rename/delete command needed) (as git tracks content not files).
45 32 kju
* Lot less HDD use compared to SVN.
46 31 kju
47 31 kju
h3. Cons of git
48 1 kju
49 1 kju
* There is a transition phase when coming from SVN. Different wording,
50 32 kju
  to a degree different workflow, *more complex*.
51 1 kju
52 33 kju
h3. Recommended videos (git)
53 4 kju
54 9 kju
* "GitCasts: Git on Windows":http://www.bestechvideos.com/2008/06/11/gitcasts-git-on-windows. 13 minute screencast.
55 16 kju
  Nice straight forward introduction to git; installing git on windows,
56 16 kju
  using git GUI. Needs basic understanding of VCS.
57 2 kju
* "Distributed Version Control with Git":http://www.vimeo.com/4141466 50 minutes screencast.
58 2 kju
  Explains VBS in general, pros of distributed ones and 
59 2 kju
* "Git Overview Demo (commits, branches, merging, apps)":http://www.vimeo.com/4219277 30 minutes screencast. Quite nice video
60 2 kju
  explaining in detail and easy to understand how to do
61 2 kju
  the basic operations on command line. Great way to get
62 2 kju
  into the basic workflow and possibilities of VCS.
63 2 kju
  Also show *git GUI* briefly.
64 2 kju
* "git-gui screencast":http://www.vimeo.com/2111264 6 minute screencast. 
65 2 kju
  *Explains basic workflow of git GUI* and *shows how to*
66 2 kju
  *stage and commit single line(s)*.
67 2 kju
  This allows small, atomic commits easily! No longer worry
68 2 kju
  about changing several aspects at the same time.
69 1 kju
  *You can sort the commits later on smoothly with this*.
70 1 kju
* GitExtension videos tutorials:
71 1 kju
** "1 Clone - Git Extensions":http://www.youtube.com/watch?v=TlZXSkJGKF8
72 1 kju
** "2 Commit changes":http://www.youtube.com/watch?v=B8uvje6X7lo
73 1 kju
** "3 Push changes":http://www.youtube.com/watch?v=JByfXdbVAiE
74 1 kju
** "4 Pull changes":http://www.youtube.com/watch?v=9g8gXPsi5Ko
75 1 kju
** "5 Handle merge conflicts":http://www.youtube.com/watch?v=Kmc39RvuGM8
76 1 kju
* "Hasan on GIT":http://www.vimeo.com/2881930: 20 minutes recording of git presentation.
77 1 kju
  Fair job and bit more interactive and fun due the present audience.
78 26 kju
* "RailsConf Git Talk":http://gitcasts.com/posts/railsconf-git-talk. 55 minutes screencast.
79 26 kju
  By schacon - *extremely well done and very extensive*!
80 12 kju
81 12 kju
Advanced:
82 12 kju
83 20 kju
These are all command line based videos explaining the basics of git throughly.
84 20 kju
85 23 kju
* "GitCasts: Normal Workflow":http://www.bestechvideos.com/2008/05/29/gitcasts-normal-workflow: 5 minute screencast.
86 23 kju
  This episode demonstrates how to setup your .gitignore file, how to use and
87 23 kju
  interpret git status output, how to add and remove files from your index,
88 23 kju
  how to commit and what git does in the object database during these operations.
89 21 kju
* "GitCasts: Setup, Initialization and Cloning":http://www.bestechvideos.com/2008/05/29/gitcasts-setup-initialization-and-cloning: 5 minute screencast.
90 21 kju
  This episode shows you how to setup your Git configuration, how to initialize
91 21 kju
  a new repository and how to clone an existing repository over both
92 1 kju
  the Git transport and the HTTP transport.
93 23 kju
* "GitCasts: Git Diff":http://www.bestechvideos.com/2008/07/12/gitcasts-git-diff: 9 minute screencast.
94 10 kju
  This episode goes over some of the common or interesting options to 'git diff',
95 16 kju
  showing how to see what has changed between your last commit and
96 16 kju
  your staged files, unstaged files, all changed files or another commit.
97 1 kju
  We also demonstrate how to create and apply patchfiles and
98 10 kju
  how to view changed file stats using diff.
99 13 kju
* "GitCasts: Git Log":http://www.bestechvideos.com/2008/05/29/gitcasts-git-log: 6 minute screencast.
100 13 kju
  This episode is on git-log, which demonstrates most of the major features and
101 13 kju
  options to the git-log command. It includes showing the stat, short-stat and
102 13 kju
  name-stat options, the pretty options, the since and until limiters, the path
103 13 kju
  limiter and author field searching.
104 20 kju
* "GitCasts: Interactive Adding":http://www.bestechvideos.com/2008/05/29/gitcasts-interactive-adding: 4 minute screencast.
105 20 kju
  This episode demonstrates how to use the git interactive add command.
106 20 kju
  It covers all of the major features of interactive adding, including status,
107 20 kju
  update, revert, add untracked, patch and diff.
108 1 kju
109 1 kju
Expert:
110 1 kju
111 19 kju
* "GitCasts: Branching and Merging":http://www.bestechvideos.com/2008/05/29/gitcasts-branching-and-merging: 9 minute screencast.
112 19 kju
  In this screencast, we take you through a workflow where we branch, stash and
113 19 kju
  merge several times. It demonstrates the branch and show-branch commands,
114 19 kju
  how to switch branches, how to stash changes, how to list and apply stashes,
115 19 kju
  how to resolve conflicts, how to create and delete topic branches,
116 19 kju
  and what fast-forward merges are.
117 22 kju
* "GitCasts: Rebasing":http://www.bestechvideos.com/2008/05/29/gitcasts-rebasing: 10 minutes Screencast.
118 22 kju
  This screencast follows roughly the same course as the previous one on
119 22 kju
  branching and merging, only I replace merging with rebasing.
120 22 kju
  This screencast also demonstrates the interactive rebase command git rebase -i.
121 22 kju
  I also demonstrate some slightly more complex branching, by using both
122 22 kju
  interactive and normal rebasing techniques simultaneously on separate branches,
123 22 kju
  then choosing one and deleting the other.
124 19 kju
* "GitCasts: Git Submodules":http://www.bestechvideos.com/2008/06/23/gitcasts-git-submodules: 15 minutes Screencast.
125 19 kju
  Needs submodules concept understanding!
126 19 kju
  Shows use of submodules quite extensively and well presented.
127 14 kju
* "GitCasts: Browsing Git Objects":http://www.bestechvideos.com/2008/05/29/gitcasts-browsing-git-objects: 7 minute screencast.
128 14 kju
  In this episode, I show how to browse and inspect raw Git objects.
129 14 kju
  The major tools covered are the git cat-file and git ls-tree commands to
130 14 kju
  inspect the object contents, and then I cover some of the included graphical
131 14 kju
  browsers, gitk and gitweb.
132 24 kju
* "GitCasts: Distributed Workflow":http://www.bestechvideos.com/2008/05/29/gitcasts-distributed-workflow: 14 minutes screencast.
133 24 kju
  This screencast demonstrates a distributed workflow. It takes two personas,
134 24 kju
  creating a project in GitHub and pushing to it in the first persona, then
135 24 kju
  cloning that project in the second. The second sets up a public, read-only
136 24 kju
  HTTP repository on his own server. The first then fetches from that, merges
137 24 kju
  changes and pushes back to GitHub. It also demonstrates an instance in which
138 24 kju
  the Author and Committer fields can differ for a commit.
139 14 kju
140 4 kju
h3. Links
141 25 kju
142 30 kju
* "Git home":http://git-scm.com
143 30 kju
144 26 kju
* "Git Community Book":http://book.git-scm.com/: Welcome to the Git Community Book.
145 1 kju
  This book has been built by dozens of people in the Git community,
146 1 kju
  and is meant to help you learn how to use Git as quickly and easily as possible. 
147 30 kju
* "GitFaq":http://git.or.cz/gitwiki/GitFaq: Official FAQ. Lots of good info.
148 30 kju
* "GitTips":http://git.or.cz/gitwiki/GitTips: Many useful tips.
149 30 kju
* "GitReady":http://gitready.com/: If you're looking for pointers (no pun intended) on how to use git,
150 30 kju
  look no further! The goal with this site is to make it usable as a way for beginners to get off
151 30 kju
  the ground using Git and to show those who are already familiar with Git some new tricks. 
152 30 kju
153 30 kju
* "Git bash aliases":http://git.or.cz/gitwiki/Aliases: With aliases, you can avoid typing
154 30 kju
  the same commands over and over again. Since version 1.5.0,
155 30 kju
  Git supports aliases executing non-git commands, by prefixing the value with @!@.
156 30 kju
157 30 kju
* "WhyGitIsBetterThanX":http://www.whygitisbetterthanx.com: Here is why people are switching to Git from X,
158 30 kju
  and why you should too. Just click on a reason to view it. 
159 30 kju
160 30 kju
161 30 kju
162 30 kju
h4. Further reading
163 30 kju
164 30 kju
* "Djief’s Blog about git":http://jfcouture.com/category/git. Contains interesting tips.
165 30 kju
166 30 kju
* "Carl Mercier’s blog: No nonsense GIT, part 1: git-remote-branch":http://blog.carlmercier.com/2008/01/25/no-nonsense-git-part-1-git-remote-branch.
167 30 kju
168 30 kju
* "Git-presentations":http://github.com/schacon/git-presentations/tree/master by schacon
169 30 kju
** Basic git talk: "60 minutes screencast version":http://gitcasts.com/posts/railsconf-git-talk.
170 25 kju
High level overview of Git, why people use it, comparisons to SVN (including benchmarks), then a rundown on basic usage 
171 25 kju
- setting up, workflow (edit/add/commit), what's happening behind the scenes, branchingand merging, log, diff, etc. 
172 1 kju
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 
173 25 kju
a chatty audience.
174 30 kju
** Git world economy talk:
175 25 kju
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, 
176 25 kju
intended to convince people to move their personal and company open source projects to Git and GitHub. This talk is 
177 25 kju
about half high level Git evangelization, then half GitHub evangelization.
178 30 kju
** RailsConf08:
179 25 kju
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 
180 25 kju
45-50 minutes. I did a screencast of this deck, so you can see the presentation being given (url in the readme in that 
181 25 kju
subdir). It introduces basic Git concepts, starting from the internals, then goes over all the porcelain you use most 
182 25 kju
often. This is a bit old (pre 1.6), it still assumes you have all the executables in your path rather than in libexec, 
183 1 kju
and I've since moved away from talking about internals off the bat (Basic Git Talk still goes over some internal 
184 1 kju
concepts, but much more gently and farther into the presentation, I think.
185 30 kju
** Sor09:
186 1 kju
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 
187 1 kju
commands (revision selection, bisect, rebasing, etc). It is a large deck, over 500 slides - it will take at least 2 
188 1 kju
hours to get through. I did 80% of it in 45 minutes, but I was in overdrive., One could easily split it into two 
189 1 kju
shorter presentations.
190 30 kju
191 30 kju
h4. Handy extension
192 30 kju
193 30 kju
* "Git Remote Branching":http://github.com/webmat/git_remote_branch: git remote branch is a simple command-line tool
194 30 kju
  that makes it very easy to manipulate branches published in shared repositories. Very useful script written in Ruby. 
195 30 kju
  Can be used to simplify managing remote branches (create, track or remove)
196 30 kju
* "Experimental Client - NetBeans Git Plugin":http://www.nbgit.org: This is only a wrapper,
197 30 kju
   you still require a git implementation (MSYS/CygWin).
198 30 kju
199 30 kju
h4. Non dev heaven related git tools
200 30 kju
201 30 kju
* "Howto use Git and SVN together | Flavio Castelli":http://flavio.castelli.name/howto_use_git_with_svn: Use git local with a SVN server.
202 30 kju
* "Secure source code hosting and collaborative development - GitHub":http://www.github.com: : Free/commerical git repository hosting.
203 30 kju
* "Gitorious":http://gitorious.org: Free git repository hosting.
204 30 kju
* "9$ screencast by Geoffrey Grosenbach on peeopcode":http://peepcode.com/products/git.
205 25 kju
206 4 kju
h2. Subversion (SVN)
207 1 kju
208 4 kju
h3. Pros
209 4 kju
210 4 kju
h3. Cons
211 1 kju
212 33 kju
h3. Recommended videos (svn)
213 5 kju
214 17 kju
* "TortoiseSVN (Subversion) for local use:
215 17 kju
  Short and good for non IT people. Summarizes the basic workflow.
216 17 kju
** "Part 1":http://www.youtube.com/watch?v=-h6cj6O94Gs: 4 minute screencast.
217 17 kju
   Topic: Baisc introduction to VCS and basic install guide for TSVN.
218 17 kju
** "Part 2":http://www.youtube.com/watch?v=4jlvW2_vxQY: 6 minute screencast.
219 17 kju
   Topic: The basic checkout of a repository.
220 17 kju
** "Part 3":http://www.youtube.com/watch?v=fklbVZyZbcc: 6 minute screencast.
221 17 kju
   Topic: Organization, create basic directory structure.
222 17 kju
** "Part 4a":http://www.youtube.com/watch?v=vwV6y0SQNx0: 8 minute screencast.
223 17 kju
   Topic: Checkout and add files.
224 17 kju
** "Part 4b":http://www.youtube.com/watch?v=yEXXIjMLL68: 4 minute screencast.
225 17 kju
   Topic: Checkin or committing files to the repository.
226 17 kju
** "Part 5":http://www.youtube.com/watch?v=Z_A7SFbczVc: 9 minute screencast.
227 17 kju
   Topic: Version of files, commit comments.
228 17 kju
** "Part 6a":http://www.youtube.com/watch?v=o9iU88Oijcw: 6 minute screencast.
229 17 kju
   Topic: Version number for files, SVN log and file history.
230 17 kju
** "Part 6b":http://www.youtube.com/watch?v=CxPFRD_YJpg: 6 minute screencast.
231 17 kju
   Topic: Basic intro to the concept of branching and how to create them in TSVN.
232 17 kju
233 17 kju
* "Installing Subversion":http://www.youtube.com/watch?v=2LU6LDXJm7U: 6 minute screencast.
234 17 kju
  Nice basic install guide and intro to TSVN for non IT people.
235 7 kju
* "Basic SVN":http://www.vimeo.com/2260989: 13 minutes screencast. Basic intro to Tortoise SVN,
236 7 kju
  and some of the basic function that should be used when working on a project.
237 6 kju
* "Tutorial: using tortoisesvn, subversion on windows":http://www.vimeo.com/1155196: 20 minute screencast.
238 1 kju
  Nice introductory tutorial on subversion using tortoisesvn covering creating
239 9 kju
  a repository, checking in, merging and some basic version control issues.
240 9 kju
* "Learning how to resolve conflicts within Subversion (SVN) using TortoiseSVN":http://www.bestechvideos.com/2008/08/11/dimecasts-net-34-learning-how-to-resolve-conflicts-within-subversion-svn-using-tortoisesvn
241 9 kju
  6 minute screencast. Nice short video explaining conflicts and how to resolve them with TSVN.
242 17 kju
* "Tutorial SVN":http://www.youtube.com/watch?v=d1RVEtsLWyE: 3 minute screencast.
243 17 kju
  Explain in French how to setup a repos with TSVN.
244 12 kju
245 12 kju
Advanced:
246 12 kju
247 15 kju
* "Best Practices for Subversion (SVN)":http://www.youtube.com/watch?v=MfLLDg7zWQg: 8 minute screencast.
248 15 kju
  Somewhat confusing as voice and text are not properly linked. Fair idea to listen
249 15 kju
  to voice *only* first and watch it a second time without sound.
250 15 kju
  That said good video sharing some thoughts about standard SVN directory structure
251 15 kju
  and directory design, updating, commit logs and binary file handling in SVN.
252 17 kju
* "Creating a Branch in SVN with TSVN":http://www.youtube.com/watch?v=7j4tvvYSTIg: 3 minute screencast.
253 17 kju
  Short, nicely explained and well done.
254 15 kju
255 15 kju
Expert:
256 15 kju
257 8 kju
* "Apache and TortoiseSVN":http://www.vimeo.com/2182829. 20 minutes screencast.
258 8 kju
  In case you want to setup your own SVN repository on a server with apache.
259 4 kju
260 4 kju
h3. Links
261 4 kju
262 18 kju
Basics:
263 18 kju
264 4 kju
* "TSVN @ wikipedia":http://en.wikipedia.org/wiki/TortoiseSVN: Short and good feature summary.
265 4 kju
* "TSVN home site":http://tortoisesvn.tigris.org/: Features of TSVN section contains many links to
266 4 kju
  pictures to give you an good idea of the tool and its look.
267 18 kju
268 18 kju
Docu:
269 18 kju
270 18 kju
* "svnbook":http://svnbook.red-bean.com/
271 18 kju
272 18 kju
Tools: