GitHub is a Git hosting and software collaboration platform owned by Microsoft, layering pull requests, issue tracking, project boards, and built-in CI/CD (GitHub Actions) on top of Git repositories. It's the single most-used collaboration tool in software development, reported in roughly 81.1% of developer surveys. Teams standardize on it because nearly every open-source project already lives there, and its PR review workflow plus Actions automation cover code hosting, code review, and deployment in one place.
GitHub Actions lets you define automated CI/CD pipelines as YAML files checked into the repo itself, under .github/workflows/. This one runs tests on every push and pull request.
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
Create a free account at github.com, then push an existing local repo up to a new GitHub repo from the command line.
# create the repo on GitHub first, then locally:
git remote add origin https://github.com/username/my-repo.git
git branch -M main
git push -u origin main
# open a pull request from the CLI (requires GitHub CLI)
gh pr create --title "Add feature" --body "Description of changes"