Skip
Arish's avatar

28. What is GitHub?


What is GitHub?

GitHub is a web-based platform for hosting Git repositories. It's the world's largest code hosting platform with over 100 million developers.

Git vs GitHub

GitGitHub
Version control systemHosting platform
Installed on your computerAccessed via web
Command-line toolWeb interface + API
Created by Linus TorvaldsCreated by Tom Preston-Werner
Free and open sourceFreemium service

Key Point: Git is the tool, GitHub is a service that hosts Git repositories.

GitHub Features

1. Repository Hosting

Store your code in the cloud:

github.com/username/repository-name

2. Pull Requests

Propose changes and review code:

1. Create branch 2. Make changes 3. Open Pull Request 4. Review & discuss 5. Merge

3. Issues

Track bugs, features, and tasks:

Issue #42: Fix login bug - Assigned to: @developer - Labels: bug, high-priority - Milestone: v1.0.0

4. Actions (CI/CD)

Automate workflows:

yaml
1# .github/workflows/test.yml
2on: push
3jobs:
4  test:
5    runs-on: ubuntu-latest
6    steps:
7      - uses: actions/checkout@v2
8      - run: npm test

5. Pages

Host websites for free:

username.github.io/repository

6. Discussions

Community Q&A and conversations.

7. Projects

Kanban-style project management.

GitHub Account Types

TypeFeatures
FreeUnlimited public/private repos, 2000 Actions minutes/month
ProAdvanced features, more Actions minutes
TeamOrganization features, team management
EnterpriseAdvanced security, compliance

Creating a GitHub Account

  1. Go to github.com
  2. Click "Sign up"
  3. Enter email, password, username
  4. Verify your email
  5. Complete the setup wizard

GitHub Terminology

Repository (Repo)

A project container with code, issues, and settings.

Fork

A copy of someone else's repository in your account.

Star

Bookmark a repository you like.

Watch

Get notifications for repository activity.

Clone

Download a repository to your computer.

Fork vs Clone

Fork: Copy on GitHub (your account) Clone: Copy on your computer

Your GitHub Profile

Your profile shows:

  • Repositories: Your projects
  • Contributions: Your activity graph
  • Followers/Following: Your network
  • Bio: About you
  • README: Custom profile page

Profile README

Create a repository named username/username with a README.md for a custom profile.

GitHub URLs

# User profile github.com/username # Repository github.com/username/repository # Specific file github.com/username/repository/blob/main/file.js # Specific line github.com/username/repository/blob/main/file.js#L42 # Pull request github.com/username/repository/pull/123 # Issue github.com/username/repository/issues/456

GitHub for Open Source

Contributing to Projects

  1. Find a project you want to contribute to
  2. Fork the repository
  3. Clone your fork
  4. Create a branch for your changes
  5. Make changes and commit
  6. Push to your fork
  7. Open a Pull Request to the original repo
  • Linux
  • React
  • VS Code
  • Kubernetes
  • TensorFlow

GitHub CLI

Install the GitHub CLI for terminal access:

bash
1# Install (Mac)
2brew install gh
3
4# Login
5gh auth login
6
7# Create repo
8gh repo create my-project
9
10# Create issue
11gh issue create
12
13# Create PR
14gh pr create

Summary

GitHub provides:

  • ✅ Free repository hosting
  • ✅ Collaboration features (PRs, Issues)
  • ✅ CI/CD with Actions
  • ✅ Project management tools
  • ✅ Community features
  • ✅ Free website hosting

Next, let's create your first remote repository!