Git & GitHub Tutorial
Learn Git & GitHub step by step through 90 structured lessons. The course starts with essential concepts and progresses toward practical, advanced topics, with explanations, syntax, examples, common mistakes and exercises you can try yourself.
- Level: Beginner to advanced
- Format: 90 free, self-paced lessons
- Best for: Students, career changers and developers refreshing their skills
What You Will Learn
This learning path covers the following areas in curriculum order:
- Git Fundamentals
- Git Basics
- Git Branching
- Undoing Changes
- Stashing and Cherry-Picking
- Git Remotes
- Rebasing
- Tags and Releases
- Collaboration Workflows
- GitHub Basics
- Pull Requests
- Issues and Project Management
- SSH, Signing and Security
- Git Hooks and Automation
- Best Practices and Troubleshooting
Who This Course Is For
This tutorial is suitable for complete beginners as well as learners who already know some programming and want a structured reference. Start from the first lesson if the subject is new to you. Experienced learners can use the curriculum below to jump directly to a specific concept.
How to Use This Tutorial
- Read each lesson in curriculum order and run every example yourself.
- Change the examples to test your understanding instead of only copying them.
- Complete the exercises and review the common-mistake sections before moving on.
- Bookmark this course page so you can return to the complete lesson index.
Course Contents
Git Fundamentals
- Git Introduction
- Installing Git
- Configuring Git
- Git Get Started (First Repository)
- How Git Works (Snapshots, Not Diffs)
- The Three States: Working Directory, Staging, Repository
Git Basics
- git init
- git status
- git add and the Staging Area
- git commit
- git diff
- git log
- Ignoring Files with .gitignore
Git Branching
- Understanding Branches
- git branch
- git switch and git checkout
- Creating and Deleting Branches
- git merge
- Resolving Merge Conflicts
- Fast-Forward vs Three-Way Merges
Undoing Changes
Stashing and Cherry-Picking
Git Remotes
- Understanding Remotes
- git remote add
- git clone
- git fetch vs git pull
- git push
- Tracking Branches
- Upstream vs Origin
Rebasing
- git rebase Basics
- Rebase vs Merge
- Interactive Rebase
- Squashing Commits
- Resolving Rebase Conflicts
- The Golden Rule of Rebasing
Tags and Releases
- Git Tags
- Annotated vs Lightweight Tags
- Managing Tags
- Pushing Tags to a Remote
- Semantic Versioning with Tags
Collaboration Workflows
- Centralized Workflow
- Feature Branch Workflow
- Gitflow Workflow
- Forking Workflow
- Trunk-Based Development
- Choosing a Git Workflow
GitHub Basics
- What Is GitHub?
- Creating a GitHub Account
- Creating a Repository on GitHub
- Writing a Good README
- GitHub Repository Structure
- Connecting a Local Repo to GitHub
Pull Requests
- What Is a Pull Request?
- Creating a Pull Request
- Code Review on GitHub
- Merge Strategies: Merge, Squash, Rebase
- Resolving Pull Request Conflicts
- Draft Pull Requests
Issues and Project Management
- GitHub Issues
- Labels and Milestones
- GitHub Projects (Boards)
- Linking Issues and Pull Requests
- Closing Issues with Commits
- GitHub Discussions
SSH, Signing and Security
- SSH Keys for GitHub
- GPG Commit Signing
- Personal Access Tokens
- Keeping Sensitive Data Out of Git
- Removing Secrets from Git History
- Branch Protection Rules
Git Hooks and Automation
- What Are Git Hooks?
- Client-Side Hooks (pre-commit, commit-msg)
- Server-Side Hooks
- Husky and Hooks in JavaScript Projects
- Introduction to GitHub Actions
- Your First GitHub Actions Workflow
Best Practices and Troubleshooting
- Commit Message Conventions
- .gitattributes and Line Endings
- Git LFS for Large Files
- git bisect
- Common Git Errors and How to Fix Them
- Git Command Reference
Frequently Asked Questions
Is this Git & GitHub tutorial free?
Yes. The lessons listed on this page are free to read and can be completed at your own pace.
Do I need previous experience?
No previous experience is required for the introductory lessons. Some advanced modules are easier if you first complete the fundamentals in this course.
How should I practise?
Type and run the examples, deliberately change their inputs, predict the result before execution and build a small project after completing each major section.
