講座Series

Git & Version Control: From Fundamentals to Advanced Workflows

Learn Git from the ground up, understand how version control works, collaborate across different repository hosting platforms, and master advanced workflows, automation, security, and repository management.

15 lessons3 levelsAbout 2 hours of reading

Start with lesson 1

Intermediate

Hands-on practice for people who know the basics and use them in real projects.

  1. Lesson 7: Pull Requests, Merge Requests, Code Reviews, and Team CollaborationPropose changes that are easy to review, review them well, choose a merge method, protect the main branch, and collaborate through forks or email patches.8 min read
  2. Lesson 8: Git Branching Strategies: Trunk-Based Development, Git Flow, and Feature BranchesHow long should branches live, and how should work reach a release? Trunk-based development, feature branches, Git Flow, and release branches compared honestly.7 min read
  3. Lesson 9: Undoing Mistakes in Git: Restore, Reset, Revert, and ReflogPick the right undo for the job: restore files, amend a commit, reset local history, revert shared history, and recover 'lost' work with the reflog.8 min read
  4. Lesson 10: Advanced Git Workflows: Rebase, Cherry-Pick, Stash, Tags, and ReleasesShape history deliberately: rebase and tidy commits, copy fixes with cherry-pick, set work aside with stash, and mark releases with tags, each with its safety rule.8 min read

Pro

Advanced techniques for large, complex, and production systems.

  1. Lesson 11: CI/CD with Git: GitHub Actions, GitLab CI/CD, and Open-Source AlternativesAutomate tests and releases from Git events, keep the logic portable in scripts, and see the same pipeline on GitHub Actions, GitLab CI/CD, and Forgejo Actions, with their real differences.9 min read
  2. Lesson 12: Git Repository Security: Permissions, Secrets, Commit Signing, and Supply Chain ProtectionProtect the repository itself: least-privilege access, protected branches and tags, keeping secrets out and responding when one gets in, and signing commits so others can verify them.9 min read