Understanding GitHub

GitHub is a cloud-based platform that helps developers store and manage their code, as well as track and control changes to their software. It is the world's largest host of source code and acts as a social network for developers to collaborate on projects from anywhere in the world.

GitHub

1. Git vs. GitHub: What's the difference?

It is common to confuse the two, but they are very different tools that work together:

  • Git: A local tool installed on your computer. It is the version control system that tracks your file history.
  • GitHub: A website (cloud service) that hosts Git repositories. It allows you to share your local Git history with others.

2. Key Features

Feature Description
Repository (Repo)A "project folder" that contains all project files and their revision history.
BranchingCreating a separate version of the main code to work on new features safely.
Pull Request (PR)A way to tell others about changes you've pushed to a branch so they can review and merge them.
IssuesA built-in task tracker to report bugs or request new features.

3. The GitHub Workflow

The standard process for contributing to a project usually follows these steps:

  1. Fork: Create a copy of a repository in your own account.
  2. Clone: Pull that code down to your local machine.
  3. Commit: Make changes and save them locally.
  4. Push: Send your local changes back up to GitHub.
  5. Pull Request: Ask the original owner to pull your changes into their project.

Knowledge Check

1. What is a "Repository" in GitHub?
A) A programming language | B) A project folder with version history | C) A type of server

2. Which tool is used locally on your computer to track changes?
A) GitHub | B) Git | C) Cloud Storage

3. What do you use to propose your changes to be merged into the main project?
A) A Fork | B) A Commit | C) A Pull Request