An Introduction to Git

MitMaro

  • Feel free to interrupt me at any point to ask questions. I will try my best.

Prerequisites

  • I will also be making comparisons where I can to Subversion as it is the only other version control system that I feel comfortable with.
  • I may also make a few comparisons to CVS; but not as often
  • If you are not familiar with bash or version control in general you should still be fine.

Overview

What is Git?

  • Written in April of 2006
  • Linux kernel developers decided to stop using Bitkeeper; their previous version control system
  • Note: Corrupted without you immediately being aware.

What is Git?

Benefits of Git

  • Locally stored repository allows continued interaction with the repository even without a network communication
  • I have used Git while flying; something nearly impossible with Subversion or CVS.

Benefits of Git - Distributed Nature

  • Locally stored repository allows continued interaction with the repository even without a network communication
  • I have used Git while flying; something nearly impossible with Subversion or CVS.

Benefits of Git - Performance

Benefits of Git - Easy Repositories

  • No special setup
  • One off scripts, research papers, presentations.

Benefits of Git - Others

Drawbacks of Git

  • I won't be going into to much detail of the drawbacks of Git.
  • But there are some
  • Why are you using Windows?
  • Tools are getting better in windows
  • Learning: This was more of a problem when Git first came out; not so much now because of great resources available
  • People familiar with Subversion or CVS may find things more difficult because many things in Git are difficult to relate
  • You can't checkout a part of the code base, it's all or nothing
  • Submodules are like svn:externals
  • There are ways to work around empty directories

Git Status

From here on I will be doing a more interactive presentation.

Git Remotes

  • So far we have worked with a local repository and one sole committer.
  • In practice there are usually several committers to a project
  • This is where git remotes come in to play by allowing the push and pull of changes

Git Remotes - GitHub

Git Workflows

  • Workflows for 2 or more people. Not for individuals.
  • This is only a introduction to the workflows.
  • I won't explain how to use them.

Git Workflows - Centralized Model

  • But you also loose out on many benefits of Git
  • Too structured in my opinion

Git Workflows - Fully Distributed Model

  • Used in small projects where developers are experimenting with new ideas and want to share them.

Git Workflows - Decentralized Model

  • Used by the Linux Kernel team

Git Workflows - Centralized Hybrid Model

  • Central repository remains stable
  • If you are interested in learning more about Git workflows I am hoping to do another presentation.

The End

Thank You!