Share
Embed
GIT as the Distributed Version Control System and as a Way of Life
DBS ITT Lunch and Learn Tech Sharing May 2014
Speakers
1. GIT as the Distributed Version Control System and as a Way of Life by Steve Teo
Steve Teo
May 08, 2014
Transcript
36 slides
-
What is this all about? - Once a month lunchtime
session - Focus on the learning and sharing of technology - Open to all folks who have a kin interest -
What is the session format? - Talks (Short/Long) - Lightning
Talks (5 mins) - Anything else you can think of -
How did this come about? - Lack of a platform
for learning/sharing of technology - My experience with tech meetups, conferences, etc. - Some encouragement from the folks around me -
What is the grand vision? - To build a community
of folks who are aware and excited about technology -
What is in it for us? - Fosters learning and
growth - Community & Networking - Ideas, Inspirations, Collaboration -
What can people talk on? - Anything to do with
technology - Something you have been up to - Something your team has been up to - Cool hacks - Anything else you can think of -
How can you contribute? - Be a speaker - Be
a co-organiser - Be an attendee - Let others know about this - Give useful feedback - Anything else you can think of -
Intranet Sharepoint - Lunch and Learn Sessions - External Tech
Meetups - Interesting Articles - Anything else you can think of -
Git As the Distributed Version Control System As a Way
of Life By Steve Teo -
Quick Survey - How many of you use a VCS
in their daily work? - How many of you know the difference between a CVCS and a DVCS? - How many of you know/use Git/Mercurial? -
Motivation for this Talk - Been through almost every VCS
in the following order No VCS -> SVN -> Mercurial -> GIT -> CVS, Clearcase This is how I feel nowadays when I have to work with a centralized VCS or no VCS -
Motivation for this Talk - Creating GIT guide while mentoring
for NUS Computing CS2103 Software Engineering - DVCS Research Topic for NUS Computing CS4217 Software Development Technologies https://sites.google.com/site/cs4217jan2011team7/home -
GIT Introduction - Created by Linus Torvalds (Linux Fame) in
2005 - Free and Open Source http://git-scm.com/ - Most recognized Distributed Version Control System due to https://github.com/ - Used by almost all new modern open-source (and increasingly, close-sourced) projects today - More info: http://en.wikipedia.org/wiki/Git_(software) -
Winning Features http://git-scm.com/about/ - Distributed - Consistency assurance - Branch
and Merge with no Fear (The way software is supposed to be done) -
Think Distributed! - Commits done locally, anywhere, anytime - Push,
pull when ready - If your central repository goes down, no sweat if someone else has a copy - Lightning fast VCS operations! -
Think Implications! - Everyone has their own repository, there is
no 'default' centralized repository -
Think Implications! - Team members must be disciplined to commit
and pull/push regularly - Need to look at your/team development requirements and come up with a usable and realistic workflow/branching model -
Think Workflows! - Decide on a workflow which you can
use. - For most projects transiting over from a CVCS, the centralized workflow is what you should be looking for. - Easy to convert to another workflow later if needed. http://git-scm.com/book/en/Distributed-Git-Distributed-Workflows https://www.atlassian.com/git/workflows#!workflow-overview -
Think Branching Models! - GitFlow (For serious projects with a
fairly long release cycle) http://nvie.com/posts/a-successful-git-branching-model/ https://github.com/nvie/gitflow - GitHub Flow (For projects enabled by continous delivery) http://scottchacon.com/2011/08/31/github-flow.html https://guides.github.com/introduction/flow/index.html -
Consistency Assurance - SHA1 Hashing all the way down (even
Commits are identified by hashes) - Corruptions/Malicious Intent on repositories can be detected - Assurance that what you commited 5 years ago will still be the same when you check it out -
Branch and Merge with no Fear - Branching and Merging
are done locally and lightning fast! - Merge tracking better than anything out there - All these is due to a superior underlying architecture. GIT is fundamentally a content-addressable filesystem. - Highly recommended to read this excellent open-source book if you want to know how GIT works internally and why operations are so fast and reliable. https://github.com/pluralsight/git-internals-pdf -
How to get GIT? Supported on all major OSes (Windows,
OSX, Linux, Solaris) Download links on http://git-scm.com/ - Official Windows msysgit project: http://msysgit.github.io/ - Mac: comes default, update via homebrew or download if necessary - Linux: depends on distro. Use a suitable package manager -
GIT Clients - Official List: http://git-scm.com/downloads/guis - Master the command
line - SmartGIT (Java Cross Platform. Free only for non-commercial usage) http://www.syntevo.com/smartgithg/ - GitHub Client (Free. Windows, Mac) https://windows.github.com/ https://mac.github.com/ -
GIT Clients - Atlassian SourceTree (Free. Windows, Mac) http://www.sourcetreeapp.com/ -
Ungit (Free. Node.JS App) https://github.com/FredrikNoren/ungit - Look at your IDE/Text Editor and see what it offers -
How to cloud-host your GIT Repositories? - GitHub (Free for
public projects. Paid for private projects) https://github.com/ - Many others! -
How to self-host your GIT Repositories? - Atlassian Stash (Cheap
for small developer teams, startups. Cross-platform) https://www.atlassian.com/software/stash - GitLab (Free community and paid enterprise version. Virtual appliance or self-install) https://www.gitlab.com/ - GitHub Enterprise (Very Expensive, but you will benefit from the GitHub way. Virtual appliance) https://enterprise.github.com/ -
How to get started? - Books: http://git-scm.com/book/en/Getting-Started https://github.com/pluralsight/git-internals-pdf - Slides:
http://training.github.com/kit/slides/github-foundations.html#/ - Workshopper Module: http://nodeschool.io/#git-it -
Some Last Words - GIT is an essential 'bread-and-butter' tool
in any Developer's arsenal - If you are not using GIT yet, you are losing out. Entire technology world is moving towards GIT. - Check out GitHub if you haven't yet. https://github.com/ - There is a learning curve (not that steep IMHO), you will 'git' it with everyday use