GETTING STARTED WITH GIT
AND GITHUB
BY
MIRACLE ANYANWU (a.k.a Polygod)
Overview
• Installing Git and create a GitHub account
• What is Git?
• What is GitHub?
• How does Git work?
• Quick math examples
Installing Git and creating an account on
GitHub
• Linux (Debian) –
• command - sudo apt-get install git
• Linux (Fedora) –
• command - sudo yum install git
• Mac - http://git-scm.com/download/mac
• Windows - http://git-scm.com/download/win
Creating an account on GitHub
What is Git ?
• Git is a version control system that keeps track of your changes,
allows for collaborative development and allows you to know who
made a particular change and when that change was mad.
• It also allows you to revert changes and go back to a particular state
• It was created in 2005 by Linus Torvalds (Creator of Linux OS) to aid
him in the creation of the Linux Kernel
Why Git ?
• Git isn’t the only version control software but I (and most people)
think it’s the best.
• Others includes: Mercurial, Subversion and Perforce
Key Concepts
• Snapshots- The way git keeps track of your code history. It records the
state of your codebase at a particular point in time. You can decide to go
back to any saved snapshot at any point in time.
• Commit – The act of creating a snapshot. A project is made up of multiple
commits. It contains the information about the files that changed, a
reference to the commit that came before it (called the parent commit),
and a hash code name (be3d3ec5069ef6524c80b3ad6b7cbde3cade4e) . It
can be a noun or verb
• I ”committed” my code
• This guy didn’t commit his code on time
Key concepts (cont’d)
• Repositories (Repo) – A collection of all the files and the history of
those files. It consists of the history of all the commits made to files
• It can live on your local machine or on a remote server (GitHub)
• The act of copying a repository from a remote server is called cloning
• The process of downloading commits that don’t exist on your machine from a
remote repository is called pulling changes
• The process of adding your local changes to the remote repository is called
pushing changes
Key Concepts (cont’d)
• Branches – Like trees, branches allows us split our codebase into
single stand-alone functionalities. All commits in git lives on a branch.
The main branch in a project is called a master branch.
• There can be lots of branches but the parent branch is always called a master
branch
Key Concept (cont’d)
• Merging -
What does a typical project look like ?
So what does a HEAD mean ?
• A head is a reference to the most recent commit
What is GitHub ?
• Website – https://www.github.com
• Founded in 2008
• Largest web-based git repository hosting service
• Allows for code collaboration with anyone online
• Adds extra functionality on top of Git like UI, Documentation, bug
tracking, feature requests, pull requests and contribution charts
NOW YOU MAY CLAP

Demo

  • 1.
    GETTING STARTED WITHGIT AND GITHUB BY MIRACLE ANYANWU (a.k.a Polygod)
  • 2.
    Overview • Installing Gitand create a GitHub account • What is Git? • What is GitHub? • How does Git work? • Quick math examples
  • 3.
    Installing Git andcreating an account on GitHub • Linux (Debian) – • command - sudo apt-get install git • Linux (Fedora) – • command - sudo yum install git • Mac - http://git-scm.com/download/mac • Windows - http://git-scm.com/download/win
  • 4.
  • 5.
    What is Git? • Git is a version control system that keeps track of your changes, allows for collaborative development and allows you to know who made a particular change and when that change was mad. • It also allows you to revert changes and go back to a particular state • It was created in 2005 by Linus Torvalds (Creator of Linux OS) to aid him in the creation of the Linux Kernel
  • 6.
    Why Git ? •Git isn’t the only version control software but I (and most people) think it’s the best. • Others includes: Mercurial, Subversion and Perforce
  • 7.
    Key Concepts • Snapshots-The way git keeps track of your code history. It records the state of your codebase at a particular point in time. You can decide to go back to any saved snapshot at any point in time. • Commit – The act of creating a snapshot. A project is made up of multiple commits. It contains the information about the files that changed, a reference to the commit that came before it (called the parent commit), and a hash code name (be3d3ec5069ef6524c80b3ad6b7cbde3cade4e) . It can be a noun or verb • I ”committed” my code • This guy didn’t commit his code on time
  • 8.
    Key concepts (cont’d) •Repositories (Repo) – A collection of all the files and the history of those files. It consists of the history of all the commits made to files • It can live on your local machine or on a remote server (GitHub) • The act of copying a repository from a remote server is called cloning • The process of downloading commits that don’t exist on your machine from a remote repository is called pulling changes • The process of adding your local changes to the remote repository is called pushing changes
  • 9.
    Key Concepts (cont’d) •Branches – Like trees, branches allows us split our codebase into single stand-alone functionalities. All commits in git lives on a branch. The main branch in a project is called a master branch. • There can be lots of branches but the parent branch is always called a master branch
  • 10.
  • 11.
    What does atypical project look like ?
  • 12.
    So what doesa HEAD mean ? • A head is a reference to the most recent commit
  • 13.
    What is GitHub? • Website – https://www.github.com • Founded in 2008 • Largest web-based git repository hosting service • Allows for code collaboration with anyone online • Adds extra functionality on top of Git like UI, Documentation, bug tracking, feature requests, pull requests and contribution charts
  • 14.