⏱️3 min read · 510 words
GitHub is where the world’s code lives — 500M+ repositories, used by 100M developers, and essential for every developer career in 2026. This beginner tutorial covers everything from creating your first account to collaborating on open-source projects.
📋 Table of Contents
What is GitHub vs Git?
- Git: Local version control software — tracks changes to your code
- GitHub: Cloud platform hosting your Git repositories — backup + collaboration
- Git works without GitHub; GitHub requires Git
Setup
# Install Git
# macOS: brew install git
# Ubuntu: sudo apt install git
# Windows: git-scm.com/download/win
git --version # verify
# Configure identity (required for commits)
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
# Create GitHub account at github.com (free)
# Set up SSH key (recommended over HTTPS)
ssh-keygen -t ed25519 -C "you@example.com"
cat ~/.ssh/id_ed25519.pub # copy this to GitHub Settings → SSH Keys
Core Workflow
# Create a new repository on GitHub, then:
git clone git@github.com:yourusername/your-repo.git
cd your-repo
# Make changes, then commit
git add . # stage all changes
git add specific-file.py # stage specific file
git commit -m "feat: add user login"
git push origin main # push to GitHub
# See what changed
git status # what's staged/unstaged
git diff # what changed (unstaged)
git log --oneline # commit history
# Undo mistakes
git restore file.py # undo unstaged changes
git restore --staged file.py # unstage
git reset HEAD~1 --mixed # undo last commit (keep changes)
Branching for Collaboration
# Create feature branch
git checkout -b feature/user-auth
# Make changes...
git add . && git commit -m "feat: add JWT authentication"
git push origin feature/user-auth
# Open Pull Request on GitHub:
# 1. Go to your repo on github.com
# 2. Click "Compare & pull request"
# 3. Add description, request reviewers
# 4. Merge when approved
# After PR merged, update local main
git checkout main
git pull origin main
git branch -d feature/user-auth # delete local branch
GitHub Essential Features
- Issues: Track bugs and feature requests
- Pull Requests (PRs): Propose and review code changes
- GitHub Actions: Automated CI/CD (our CI/CD Guide covers this)
- GitHub Pages: Free hosting for static websites
- GitHub Copilot: AI code completion
- Discussions: Community Q&A for your project
Contributing to Open Source
# Fork a project on GitHub, then:
git clone git@github.com:YOURUSERNAME/forked-repo.git
cd forked-repo
# Add original repo as upstream
git remote add upstream git@github.com:ORIGINAL/repo.git
# Create branch, make changes, push
git checkout -b fix/typo-in-readme
# make your changes...
git add . && git commit -m "fix: correct typo in README"
git push origin fix/typo-in-readme
# Open PR on GitHub from your fork to original repo
# Be descriptive: what changed and why
Profile README (Show Your Work)
Create a special repo with your username → README.md shows on your GitHub profile. This is your developer portfolio.
GitHub in 2026 is mandatory for any developer. Your GitHub profile IS your portfolio — every employer will check it. Start committing daily, contribute to open source, and make your profile show active development work.
📚 You might also like
🔗 Share this article




✍️ Leave a Comment