Getting Started with GitHub
Everything you need to go from zero to pushing your first code. No prior experience required.
GitHub is a platform where developers store, share, and collaborate on code. Think of it like Google Drive for code, but way more powerful. It uses a tool called git under the hood that tracks every single change you make, so you can always go back in time.
- Repository (repo) -- a project folder tracked by git
- Commit -- a saved snapshot of your changes
- Branch -- a parallel version of your code
- Pull Request (PR) -- a request to merge your changes into someone else's code
- Fork -- your own copy of someone else's repo
You can create a repo from the GitHub website or the command line.
Option A: On GitHub.com
- Go to github.com/new
- Enter a repository name (e.g.,
my-first-repo) - Add a description (optional)
- Choose Public or Private
- Check "Add a README file"
- Click Create repository
Option B: From the Terminal (using GitHub CLI)
brew install gh then gh auth login
Cloning downloads a repo from GitHub to your computer so you can work on it locally.
ssh-keygen -t ed25519 then add the public key to your GitHub settings.
The core workflow you'll use every day. Edit files, stage them, commit, then push to GitHub.
git add . -- stages all changed files (the
. means "everything"). You can also add specific files: git add index.html.git commit -m "message" -- saves a snapshot with a description of what you changed.
git push -- uploads your commits to GitHub so others can see them.
A Pull Request (PR) is how you propose changes to a project. Instead of pushing directly to the main branch, you create a branch, make changes, and then ask the team to review and merge them.
Then open the link in your browser, write a description, and click Create Pull Request. Your teammates can review, comment, and approve before merging.
Forking creates your own copy of someone else's repository. This is how you contribute to open-source projects you don't own.
- Click the Fork button on any GitHub repo page
- Clone your fork to your computer
- Make changes and push to your fork
- Open a Pull Request from your fork to the original repo
Issues are GitHub's built-in bug tracker and feature request system. Every repo has an Issues tab where anyone can report problems or suggest improvements.
- Use labels to categorize:
bug,enhancement,good first issue - Reference issues in commits:
git commit -m "fix login bug, closes #12" - Assign issues to yourself or teammates
Discussions are for open-ended conversations -- Q&A, ideas, announcements. Enable them in your repo settings under Features.
GitHub Pages lets you host a website directly from a repository -- for free. Perfect for portfolios, documentation, or project demos.
- Go to your repo's Settings → Pages
- Under Source, select
mainbranch and/ (root)folder - Click Save
- Your site will be live at
https://username.github.io/repo-name
username.github.io -- it will be accessible at https://username.github.io directly.
Most Useful Beginner Projects & Repos
Twelve repositories every developer should know about. These are goldmines of free learning resources, project ideas, and community.
Git & GitHub Cheatsheet
Every command you need, organized by category. Click any command to copy it.
gh)brew install gh (macOS) or check cli.github.com for other platforms. It makes working with GitHub from the terminal dramatically faster.