GitHub Presentation for BCC Math and CS Club

Betsy Rosalen
March 22, 2018

The Git in GitHub

Git is an open-source version control system that was started by Linus Trovalds-the same person who created Linux.

Version control is a way of making it easier to:

  • keep track of changes to a project
  • revert to earlier versions of a project
  • collaborate with others on a project
  • download project files even if you are not involved in development

Git is run in the command line (Terminal on Mac)

Source: https://www.howtogeek.com/180167/htg-explains-what-is-github-and-what-do-geeks-use-it-for/

The Hub in GitHub

the center around which all things involving Git revolve is the hub - GitHub.com - where developers store their projects and network with like minded people.”

Basically GitHub is a code hosting / GUI / Website / Community built around using Git.

You can use do almost everything from the GitHub Website and the GitHub Desktop application on your computer without ever having to learn the Git command prompts.

Getting Started

The first two things you need to do if you want to use GitHub are:

For really detailed information about using Git in the command prompt…

We will not install Git today since we are working on public computers, but we will use GitHub.

Create a Repository

A repository (usually abbreviated to “repo”) is a location where all the files for a particular project are stored. Each project has its own repo, and you can access it with a unique URL.

Create a New Repo

Create a Repository

Create a New Repo

Forking a Repo

Forking” is when you create a new project in your account based off of another project that already exists.

If you find a project on GitHub that you'd like to contribute to, you can fork the repo, make the changes you'd like without changing the original project.

Create a New Repo

Pull Requests

Once you've made changes that you want to be included in the official repository you create a “pull request” asking the authors of the original repository to pull your changes into the official project.

Pull Request

Pull Requests

Pull Request

Basic Workflow

Here's a really quick 2 min video that shows the basic GitHub Workflow:

  • fork a repo
  • make a change
  • send a pull request
  • (repo authors - hopefully) accept the pull request

https://www.youtube.com/watch?v=yr6IzOGoMsQ

Create a Branch

Branching is the way to work on different versions of a repository at one time.

By default your repository has one branch named master which is considered to be the definitive branch. Use branches to experiment and make edits before committing them to master.

When you create a branch off the master branch, you're making a copy, or snapshot, of master as it was at that point in time.

Social networking

Each user on GitHub has their own profile that acts like a resume of sorts, showing your past work and contributions to other projects via pull requests.

Project revisions can be discussed publicly, so a mass of experts can contribute knowledge and collaborate to advance a project forward.

Learn More

There are lots of tutorials and how-to videos on the internet if you just google, but here are a couple especially good resources…

GitHub YouTube Channel

https://www.youtube.com/user/GitHubGuides/videos

Try Git

https://try.github.io