KHUYẾN MÃI MÙA HÈ: GIẢM 20% TẤT CẢ DỊCH VỤ - HẠN CHÓT 30/6GIỚI THIỆU KHÁCH HÀNG MỚI: NHẬN 15% HOA HỒNG TRÊN HÓA ĐƠN ĐẦU TIÊNKHUYẾN MÃI MÙA HÈ: GIẢM 20% TẤT CẢ DỊCH VỤ - HẠN CHÓT 30/6GIỚI THIỆU KHÁCH HÀNG MỚI: NHẬN 15% HOA HỒNG TRÊN HÓA ĐƠN ĐẦU TIÊN
Tan Phat Media

Lộ Trình Git & GitHub 2026

Lộ trình học Git & GitHub chi tiết nhất 2026 với Version Control, Branching Strategy, Pull Requests, GitHub Actions. Skill bắt buộc cho mọi Developer theo roadmap.sh.

Lộ Trình Chi Tiết 2-3 Tháng

Roadmap được chia thành 6 giai đoạn rõ ràng theo roadmap.sh/git-github

1
Tuần 1-2: Git Fundamentals

Mục tiêu: Hiểu version control và Git basics

Version Control Concepts:

  • What is VCS: Track changes, history, collaboration
  • Git vs SVN: Distributed vs Centralized
  • Installation: Git CLI, git config (name, email)

Basic Commands:

  • git init - Initialize new repository
  • git add - Stage changes (add ., add file.txt)
  • git commit - Save changes với message (-m "message")
  • git status - Check current state
  • git log - View commit history
  • git diff - View changes

Git Areas:

  • Working Directory → Staging Area → Repository
  • .gitignore: Ignore files/folders (node_modules, .env)

Dự án thực hành:

  • • Initialize Git repo cho personal project
  • • Practice add, commit, status workflow
  • • Create .gitignore file
2
Tuần 3-4: Branching & Merging

Mục tiêu: Master branching strategies và merge conflicts

Branch Commands:

  • git branch - List, create branches
  • git checkout -b - Create và switch to new branch
  • git switch - Modern way to switch branches
  • git branch -d - Delete branch

Merging:

  • git merge - Integrate changes from another branch
  • Fast-forward merge: Linear history
  • 3-way merge: Merge commit created
  • Merge Conflicts: Resolve manually, accept changes

Branching Strategies:

  • Git Flow: main, develop, feature/*, hotfix/*, release/*
  • GitHub Flow: main + feature branches (simpler)
  • Trunk-based: Short-lived branches, frequent merges

Stash:

  • git stash - Save work temporarily
  • git stash pop - Restore stashed changes
  • git stash list - View all stashes

Dự án thực hành:

  • • Create feature branch, make changes, merge back
  • • Practice resolving merge conflicts
  • • Use stash khi switch branches
3
Tuần 5-6: Remote Repositories & GitHub

Mục tiêu: Work với remote repos và GitHub

Remote Commands:

  • git clone - Copy remote repo to local
  • git remote add origin - Connect local to remote
  • git push - Upload commits to remote
  • git pull - Download và merge from remote
  • git fetch - Download without merge

GitHub Basics:

  • Create GitHub account, SSH keys setup
  • Create repository: Public vs Private
  • README.md: Project documentation
  • LICENSE: Open source licensing

Authentication:

  • SSH Keys: Generate, add to GitHub
  • Personal Access Tokens (PAT)
  • GitHub CLI (gh): Modern authentication

Dự án thực hành:

  • • Create GitHub repo, push local project
  • • Clone existing repo, make changes, push
  • • Setup SSH authentication
4
Tuần 7-8: Collaboration & Pull Requests

Mục tiêu: Master team collaboration workflow

Pull Requests (PR):

  • Create PR: Title, description, reviewers
  • PR Best Practices: Small, focused, clear description
  • Code Review: Comment, Request changes, Approve
  • Merge Options: Merge commit, Squash, Rebase
  • Draft PRs: Work in progress

Issues & Projects:

  • Issues: Bug reports, Feature requests, Tasks
  • Labels: bug, enhancement, documentation
  • Milestones: Group issues by release
  • GitHub Projects: Kanban boards

Forking & Open Source:

  • Fork: Copy repo to your account
  • Upstream: Sync with original repo
  • Contributing: CONTRIBUTING.md guidelines

Dự án thực hành:

  • • Create PR, request review, merge
  • • Fork open source project, contribute
  • • Practice code review process
5
Tuần 9-10: Advanced Git

Mục tiêu: Master rebase, cherry-pick, và history rewriting

Rebase:

  • git rebase - Reapply commits on top of another branch
  • Rebase vs Merge: Linear history vs Merge commits
  • Interactive rebase (-i): Squash, Edit, Reorder commits
  • Golden rule: Never rebase public branches

Cherry-pick & Reset:

  • git cherry-pick - Apply specific commits
  • git reset - Move HEAD, undo commits (--soft, --mixed, --hard)
  • git revert - Create new commit that undoes changes
  • git reflog - Recovery tool, view all HEAD changes

Tags & Releases:

  • git tag - Mark specific commits (v1.0.0)
  • Annotated vs Lightweight tags
  • Semantic Versioning: MAJOR.MINOR.PATCH
  • GitHub Releases: Changelog, Assets

Dự án thực hành:

  • • Practice interactive rebase to clean history
  • • Cherry-pick commits between branches
  • • Create release với tags
6
Tuần 11-12: GitHub Actions & Automation

Mục tiêu: Automate workflows với CI/CD

GitHub Actions Basics:

  • Workflows: YAML files in .github/workflows/
  • Triggers: push, pull_request, schedule, manual
  • Jobs & Steps: Sequential và parallel execution
  • Actions Marketplace: Pre-built actions

Common Workflows:

  • CI: Run tests on every PR
  • CD: Deploy on merge to main
  • Linting: ESLint, Prettier checks
  • Security: Dependabot, CodeQL scanning

Git Hooks:

  • Pre-commit: Lint, format before commit
  • Pre-push: Run tests before push
  • Husky: Easy Git hooks management
  • Commitlint: Enforce commit message format

Dự án thực hành:

  • • Setup CI workflow (test on PR)
  • • Setup CD workflow (deploy on merge)
  • • Configure pre-commit hooks với Husky

📚 Resources Miễn Phí 100%

Tất cả tài liệu học Git & GitHub hoàn toàn miễn phí

Official Documentation
  • Pro Git Book - git-scm.com/book (free, official)
  • Git Documentation - git-scm.com/docs
  • GitHub Docs - docs.github.com
  • roadmap.sh/git-github - Interactive roadmap
Interactive Learning
  • Learn Git Branching - learngitbranching.js.org (game)
  • GitHub Skills - skills.github.com (official tutorials)
  • Oh My Git! - ohmygit.org (visual game)
  • First Contributions - Practice open source PRs
YouTube Channels
  • freeCodeCamp - Git & GitHub full course
  • Fireship - Git in 100 seconds, Git tips
  • The Coding Train - Git for beginners
  • Traversy Media - Git crash course
Tools & Cheat Sheets
  • Git Cheat Sheet - GitHub Education
  • GitKraken - GUI client (free tier)
  • GitHub CLI (gh) - Command line tool
  • VS Code Git - Built-in Git support
💡 Pro Tips Học Git Hiệu Quả
  • Learn CLI first - GUI tools limited, CLI works everywhere
  • Commit often - Small, focused commits với clear messages
  • Use branches - Never commit directly to main
  • Write good commit messages - feat:, fix:, docs: prefixes
  • Practice merge conflicts - Intentionally create và resolve
  • Contribute to open source - Best way to learn collaboration
  • Setup aliases - git config alias.co checkout

💡 Tại Sao Phải Học Git & GitHub?

Essential Skill
  • 99% công ty yêu cầu Git
  • Bắt buộc cho mọi Developer role
  • Collaboration với team
  • Track changes & history
Career Benefits
  • GitHub profile = Portfolio
  • Open source contributions
  • CI/CD automation skills
  • Rollback khi có lỗi
Skills Được Ưu Tiên 2026
  • Git CLI proficiency
  • Branching strategies
  • Pull Request workflow
  • Code review skills
  • GitHub Actions CI/CD
  • Rebase & history management
  • Merge conflict resolution
  • Git hooks automation

Câu Hỏi Thường Gặp

Giải đáp những thắc mắc phổ biến về lộ trình Git & GitHub

Tài nguyên ôn luyện liên quan

Bộ câu hỏi phỏng vấn và khoá học giúp bạn đi từ học sang phỏng vấn:

Phỏng vấn

Câu hỏi phỏng vấn Git

Cần lộ trình tùy chỉnh hoặc mentor 1-1?

Đội ngũ Tấn Phát Digital có thể tư vấn lộ trình phù hợp với background của bạn, thiết kế khoá học riêng hoặc kết nối với mentor đang đi làm thực tế.

Zalo
Facebook
Tấn Phát Digital
Zalo
Facebook