Skip to content

GitHub Overview

GitHub is a cloud-based platform for version control and collaboration, built around Git, a distributed version control system. It is widely used by developers, open-source contributors, and enterprises to manage code repositories, track changes, and collaborate efficiently.

Read in this order the first time:

  1. GitHub overview (this page): accounts, repositories, branches, pull requests and issues.
  2. How to fork a repository: contributing to projects you do not own.
  3. GitHub Actions and automation: workflows, secrets and variables, self-hosted runners, GitHub Packages and webhooks.
  4. GitHub administration guides: repository governance with rulesets, branch naming, CODEOWNERS, templates, teams and permissions.
  5. GitHub Copilot overview: features, surfaces and plans, followed by Copilot in VS Code and Copilot best practices. The Copilot menu lists the remaining Copilot guides.

New to Git itself? Start with Git fundamentals.

  • Version Control: Tracks changes in code over time.
  • Collaboration: Enables multiple contributors to work on projects.
  • Issues & Project Management: Helps teams manage tasks and track progress.
  • Pull Requests & Code Reviews: Facilitates code review and merging of changes.
  • CI/CD with GitHub Actions: Automates workflows for building, testing, and deploying applications.
  • Security & Compliance: Offers code scanning, dependency management, and security alerts.
  • Hosting & Documentation: Provides GitHub Pages for project documentation and static website hosting.
  1. Visit GitHub and sign up.
  2. Choose a username, provide an email, and create a password.
  3. Verify your email and set up your profile.
  1. Click on New Repository.
  2. Enter a repository name and description.
  3. Choose public or private visibility.
  4. Initialize with a README file (optional).
  5. Click Create Repository.

To clone a repository to your local machine, run:

Terminal window
git clone https://github.com/username/repository.git
  1. Navigate to the repository folder:
    Terminal window
    cd repository
  2. Make changes to files and stage them:
    Terminal window
    git add .
  3. Commit changes with a meaningful message:
    Terminal window
    git commit -m "Added a new feature"
  4. Push changes to GitHub:
    Terminal window
    git push origin main
Terminal window
git checkout -b feature-branch
Terminal window
git checkout main
Terminal window
git merge feature-branch
Terminal window
git branch -d feature-branch
  1. Push changes to a feature branch.
  2. Navigate to the repository on GitHub.
  3. Click Pull Requests > New Pull Request.
  4. Select the base branch and compare branch.
  5. Add a description and click Create Pull Request.
  6. Request reviewers and discuss changes.
  7. Once approved, click Merge Pull Request.
  • Create an Issue: Document bugs, feature requests, or enhancements.
  • Assign Labels & Milestones: Categorize and prioritize issues.
  • Close Issues: Automatically close issues with keywords in commit messages, e.g., Fixes #10.

GitHub Actions enables automation of CI/CD pipelines.

name: Run Tests
on: push
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install dependencies
run: npm install
- name: Run tests
run: npm test
  • Enable Two-Factor Authentication (2FA).
  • Use Dependabot for automatic dependency updates.
  • Set up branch protection rules to prevent force pushes.
  • Monitor security alerts for vulnerabilities.
  • Packages: GitHub supports package management for Docker, npm, and Maven.
  • Releases: Use GitHub Releases to distribute project versions.

GitHub combines Git hosting with review, automation, packages and security features. Continue with GitHub Actions and automation or the administration guides.