Git - PowerPoint PPT Presentation

1 / 17
About This Presentation
Title:

Git

Description:

Git The fast version control system Who am I? Senior Software Engineer and Code Chameleon with SRA International, Inc Coding in HTML and ColdFusion since version 2 of ... – PowerPoint PPT presentation

Number of Views:140
Avg rating:3.0/5.0
Slides: 18
Provided by: TraceyM
Category:
Tags: control | git | remote

less

Transcript and Presenter's Notes

Title: Git


1
Git
  • The fast version control system

2
Who am I?
  • Senior Software Engineer and Code Chameleon with
    SRA International, Inc
  • Coding in HTML and ColdFusion since version 2 of
    each (1995 and 1998 respectively).
  • Master of Information Technology.
  • Maintainer of The Girlie Code Blog at
    http//mikitracey.org
  • Can be reached at miki_at_mikitracey.org
  • Download this presentation from
    http//www.mikitracey.org (I will put it in a
    direct link in the toolbar)

3
Agenda
  • What is git?
  • Distributed?
  • Why is it different?
  • What are its drawbacks?
  • What are its benefits?
  • Demos

4
What is git?
  • Git was created by Linus Torvald around 2005 and
    is based on bitkeeper.
  • Git is a distributed version control system (see
    next slide).
  • Comparable to CVS, SVN, PVCS, VSS but also wholly
    and entirely different.
  • Open source.

5
Distributed?
Most Version Control Systems Linus Vision of Git Reality of Distributed Systems
6
Design Criteria
  • Take CVS as an example of what not to do if in
    doubt, make the exact opposite decision. (Torvald
    is quoted saying incredibly rude things about
    both CVS and SVN and in some cases, hes dead
    right, the rest are probably just matters of
    opinion) http//www.youtube.com/watch?v4XpnKHJAok
    8
  • Support a distributed, BitKeeper-like workflow
  • Very strong safeguards against corruption, either
    accidental or malicious corruption.
  • Very high performance.

7
Why is it different?
  • Distributed does not require a central
    repository or even network access.
  • Fast designed for speed.
  • Nearly incorruptible authenticates file
    downloads using cryptographic grade hashes.
  • Compatible - uses http, ftp, ssh, rsync or git
    protocol.
  • Better merge capability and independent nature
    mean you can actually use it ALONG with another
    version control system.

8
Drawbacks
  • Distributed methodology makes it difficult for
    some people to track multiple branches with the
    same/similar name.
  • Uses different terminology, sometimes the same
    word for a different thing. (a common problem
    when switching version control systems)
  • Extra steps after check-in to actually push to
    central repository.
  • These drawbacks can be mitigated with proper
    training.

9
Benefits
  • Fast. Orders of magnitude faster than some
    version control systems (tested by mozilla
    results http//weblogs.mozillazine.org/jst/archiv
    es/2006/11/vcs_performance.html)
  • Most version control systems get confused the
    second time you merge one branch to another,
    moreso if there has also been a merge from a
    third branch or changes to the branch you are
    merging to, this doesnt happen in git, it uses
    realtime diffs (similar to compare in svn and
    cvs).
  • You can use it locally with no central
    repository, or designate one of the developer
    computers as central repository. (huge benefit)

10
More Benefits
  • It can be run on a development box, with
    connections from other developers computers
    without a huge performance hit.
  • You can use it to push the code live even if your
    live server is not set up as a git repository.
  • You can access files based on commit comment.
  • Commit comment is required in most git tools.
    (you cant speak for the content of the comment,
    but at least it has to exist)

11
vocabulary
  • fetch - allows examination of changes before
    committing locally, but only on files that would
    have conflicts. Similar to cvs synchronize or
    update.
  • pull - get the full repository, similar to cvs
    replace
  • push - similar to check in, but of whole branch,
    pushes branch to final destination
  • checkout - useful for rolling back to a branch,
    tag or commit comment Similar to pulling an old
    version to commit it.

12
More vocabulary
  • HEAD - current branch (a change from what most of
    us are used to).
  • master - same as CVS HEAD this is the main branch
  • clone - create a copy of a repository stored
    locally or elsewhere. (similar to initial check
    out in CVS)
  • commit - create a 'changeset' or 'revision',
    similar to cvs commit, but NOT to the central
    repository.

13
git workflow
  • Fetch or clone (create a copy of the remote
    repository) (compare to cvs check out)
  • Modify the files in the local branch
  • Stage the files (no cvs comparison)
  • Commit the files locally (no cvs comparison)
  • Push changes to remote repository (compare to cvs
    commit)

14
How to get git.
  • Source code repository http//git-scm.com/downloa
    d
  • Windows tools all come with full copy of git
  • Cygwin
  • tortoiseGit (can interfere with vpns)
  • MSYSgit (most recommended)
  • eGit for eclipse

15
How to get help with git
  • Read That Fabulous Manual http//www.kernel.org/pu
    b/software/scm/git/docs/user-manual.html
  • Books http//progit.org/book/ (free)
  • Online training https//github.com/training/onlin
    e
  • Git user groups online http//old.nabble.com/git-f
    12403.html
  • Git mailing lists git-users_at_googlegroups.com

16
Git Hosting
  • For projects that do not require FISMA Certified
    and Acredited hosting, you can view a whole list
    of git hosting sites here https//git.wiki.kernel
    .org/index.php/GitHosting

17
Demos
  • Speed demo pull the entire git codebase from
    central repository.
  • Replace/eGit demo replace current branch with a
    copy of a remote branch.
  • Merge demo local.
  • Display history/branches. View file list by
    commit comment.
Write a Comment
User Comments (0)
About PowerShow.com