15
GIT is for people who like SVN September 18 th 2012 Vladimir Kerkez and BK

GIT is for people who like SVN September 18 th 2012 Vladimir Kerkez and BK

Embed Size (px)

Citation preview

Page 1: GIT is for people who like SVN September 18 th 2012 Vladimir Kerkez and BK

GIT is for people who like SVNSeptember 18th 2012Vladimir Kerkez and BK

Page 2: GIT is for people who like SVN September 18 th 2012 Vladimir Kerkez and BK

Today: Major differences between SVN and GIT, and why you should use GIT

Page 3: GIT is for people who like SVN September 18 th 2012 Vladimir Kerkez and BK

Branching

Page 4: GIT is for people who like SVN September 18 th 2012 Vladimir Kerkez and BK

Branching SVN: If you need to know if you had merged a branch,

you need to explicitly run commands like svn propget svn:mergeinfo to verify if it was merged or not.

You need to mark major releases with their revision numbers

Tracking branching is difficult in SVN Can’t blame people as easily

With GIT branching is much more easier & fun. You can quickly switch between branches from the same working directory. It helps finding un-merged branches and also help merging files fairly easily & quickly.

Page 5: GIT is for people who like SVN September 18 th 2012 Vladimir Kerkez and BK

Complex branching

Page 6: GIT is for people who like SVN September 18 th 2012 Vladimir Kerkez and BK

GIT is distributed, SVN is not There is a centralized repository, but

every developer has their own version of the revisions locally

Can commit without affecting main code on server

Use on flights, dungeons, etc.

Page 7: GIT is for people who like SVN September 18 th 2012 Vladimir Kerkez and BK

No global revision numbers in GIT Instead we have revision hash numbers

Page 8: GIT is for people who like SVN September 18 th 2012 Vladimir Kerkez and BK

Content integrity GIT contents are cryptographically hashed

using SHA-1 hash algorithm. This will ensure the robustness of code

contents by making it less prone to repository corruption due to disk failures, network issues etc.

Here is an interesting discussion on GIT’s content integrity – http://stackoverflow.com/questions/964331/git-file-integrity

Page 9: GIT is for people who like SVN September 18 th 2012 Vladimir Kerkez and BK

Other points It's incredibly fast. The repository owner can't dictate how I work. I can create branches

and commit changes while disconnected on my laptop, then later synchronize that with any number of other repositories.

An SSH channel, over HTTP via WebDAV, by FTP, or by sending emails holding patches to be applied by the recipient of the message. A central repository isn't necessary, but can be used.

Unlike Subversion branches carry along their complete history. Branch merging is simpler and more automatic in Git. In Subversion you need to remember what was the last revision you

merged from so you can generate the correct merge command. Git does this automatically

Branch merges are recorded as part of the proper history of the All of the users are tracked very efficiently, especially while

MERGING! it's a very simple format. The Mozilla project's CVS repository is

about 3 GB; it's about 12 GB in Subversion's fsfs format. In Git it's around 300 MB.

Page 10: GIT is for people who like SVN September 18 th 2012 Vladimir Kerkez and BK

Running GIT in a group Use your own server (cool, but you still

need a separate ticketing system/wiki) Throw a LAN party/get-together (bad

idea unless you’re looking to hang out) Use github (everyone else is doing it)

Tons of extra features, easy to set up, free for pen source projects

Page 11: GIT is for people who like SVN September 18 th 2012 Vladimir Kerkez and BK

Example project

https://github.com/jquery/jquery

Page 12: GIT is for people who like SVN September 18 th 2012 Vladimir Kerkez and BK

Setting it github https://help.github.com/articles/set-up-

git 1. Register a username/password on

github.com 2. Create a project 3. Download and install GIT:

http://git-scm.com/downloads

Page 13: GIT is for people who like SVN September 18 th 2012 Vladimir Kerkez and BK

Set Up Git

Page 14: GIT is for people who like SVN September 18 th 2012 Vladimir Kerkez and BK

Set up ssh keys Do this if you don’t want to type a

password every time https://help.github.com/articles/generati

ng-ssh-keys

Page 15: GIT is for people who like SVN September 18 th 2012 Vladimir Kerkez and BK

Create a repository Hands on with Vlad…