This document provides an overview of installing Git and creating a GitHub account, as well as explaining some key concepts about version control with Git and GitHub. It discusses installing Git on Linux, Mac and Windows systems, creating a GitHub account, and what Git and GitHub are. Key Git concepts explained include snapshots, commits, repositories, branches, merging, and what a HEAD means in Git. GitHub is described as a website that hosts Git repositories and adds extra functionality for code collaboration.
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
12. So what does a 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