|
所在平台: Udemy |
课程主页: https://www.udemy.com/course/practical-git-and-github-from-basics-to-pro-workflows/
课程评论:没有评论
**课程名称:** 实用 Git 和 GitHub:从基础到专业工作流 **课程概述:** 这是一个实操性强的课程,是您掌握 Git 和 GitHub 的终极指南。课程从零基础开始,逐步深入到真实世界的生产级工作流。您将不仅仅学习 Git 的工作原理,更会在结构化的项目、练习和挑战中实际运用它,模拟现代开发团队的协作方式。 **课程内容摘要:** * **第一部分:Git 基础与设置** * 理解 Git 及其在版本控制中的重要性。 * 安装和配置 Git(全局和本地)。 * 学习 Git 如何追踪代码历史和变更。 * 探索核心命令:`git init`, `git status`, `git add`, `git commit`。 * 理解追踪、未追踪、暂存和已修改文件的区别。 * 从零开始,使用命令行和 VSCode 创建第一个 Git 项目。 * **第二部分:探索提交与历史** * 深入 Git 内部,学习如何: * 使用 `git log` 和 `git log -oneline` 查看详细提交日志。 * 通过 `git checkout` 在提交之间导航。 * 理解 HEAD 和分离 HEAD 的概念。 * 使用 `git reflog` 安全地恢复丢失的提交。 * **第三部分:分支、合并与 Rebase 工作流** * 学习团队如何管理并行工作流,并整合代码: * 创建、切换和删除分支。 * 执行快进合并 (Fast-Forward Merge) 和三方合并 (Three-Way Merge)。 * 使用 `git rebase` 创建整洁、线性的提交历史。 * 通过 Git Log 和 VSCode GUI 可视化比较 merge 和 rebase。 * 手动解决合并冲突,并理解常见场景。 * **第四部分:高级 Git 技巧** * 解锁 Git 的全部强大功能: * 执行软、硬重置(`git reset -soft`, `-hard`, `-mixed`)。 * 使用 `git restore` 和 `git checkout` 取消暂存和丢弃更改。 * 使用 `git clean` 清理未追踪的文件。 * 使用 `.gitignore` 排除敏感和临时文件。 * 暂存进行中的工作,并在之后安全地应用(`git stash`)。 * **第五部分:提交压缩与 Cherry-Picking** * 学习如何创建清晰、集中的提交历史: * 使用 `git rebase -i` 进行交互式提交压缩。 * 学习如何应用其他分支上的单个提交(`git cherry-pick`)。 * 通过模拟生产环境,练习跨克隆仓库进行 cherry-pick。 * **第六部分:使用 GitHub** * 将本地技能扩展到云端,专业协作: * 创建 GitHub 仓库并配置 SSH 连接。 * 推送和拉取分支,配置远程仓库,设置上游跟踪。 * 理解 `git fetch` 和 `git pull` 的区别。 * 使用 GitHub UI 和 VSCode 发布分支和管理仓库。 * **第七部分:真实世界的 GitHub 工作流** * 完成端到端的协作 GitHub 挑战: * 克隆仓库,模拟多个开发者环境(dev1, dev2, dev3)。 * 通过 Pull Request 创建和合并分支。 * 执行基于合并和 rebase 的代码集成策略。 * 探索 GitHub 的分支模型和工作流决策。 **贯穿全课程的挑战:** 每个部分都包含练习和挑战,以巩固概念: * 构建隔离的 Git 项目,进行动手重复练习。 * 使用多个本地环境模拟团队协作工作流。 * 应用 `reflog`, `stash`, `cherry-pick` 等真实世界的恢复工具。
Course Description:This hands-on course is your complete guide to mastering Git and GitHub, starting from absolute basics and progressing through real-world, production-level workflows. You'll not only learn how Git works-you'll use it in structured projects, exercises, and challenges that mimic how modern development teams operate.Section 1: Git Fundamentals & SetupYou'll begin by understanding what Git is and why it's essential for version control. In this section, you'll:Install and configure Git globally and locally.Learn how Git tracks code history and changes.Explore critical commands like git init, git status, git add, and git commit.Understand the difference between tracked, untracked, staged, and modified files.Build your first Git project from scratch using the command line and VSCode.Section 2: Exploring Commits & HistoryDig deeper into Git internals and learn how to:View detailed commit logs using git log and git log -oneline.Navigate between commits with git checkout.Understand HEAD and the concept of a detached HEAD.Safely recover lost commits using git reflog.Section 3: Branching, Merging & Rebase WorkflowsYou'll learn how teams manage parallel workstreams with branches and bring everything back together:Create, switch, and delete branches.Perform Fast-Forward and Three-Way merges.Use git rebase to create a clean, linear history.Compare merge vs rebase visually using Git log and VSCode GUI.Resolve merge conflicts manually and understand common scenarios.Section 4: Advanced Git TechniquesGo beyond the basics and unlock Git's full power:Perform soft and hard resets (git reset -soft, -hard, -mixed).Unstage and discard changes using git restore and git checkout.Clean untracked files with git clean.Use.gitignore to exclude sensitive and temporary files.Stash in-progress work and safely apply it later (git stash).Section 5: Commit Squashing & Cherry-PickingUnderstand how to craft clean and focused commit histories:Use git rebase -i to squash commits interactively.Learn how to apply individual commits from other branches using git cherry-pick.Practice real scenarios that simulate production cherry-picking across cloned repositories.Section 6: Working with GitHubPush your local skills into the cloud and collaborate like a pro:Create a GitHub repo and connect via SSH.Push and pull branches, configure remotes, and set up upstream tracking.Learn the difference between git fetch and git pull.Use GitHub UI and VSCode to publish branches and manage repos.Section 7: Real-World GitHub WorkflowsWork through end-to-end collaborative GitHub challenges:Clone repositories and simulate multiple developer environments (dev1, dev2, dev3).Create and merge branches using pull requests.Perform merge and rebase-based strategies for integrating code.Explore GitHub branching models and workflow decisions.Practice Challenges ThroughoutEach section includes exercises and challenges to reinforce concepts:Build isolated Git projects for hands-on repetition.Simulate team-based workflows using multiple local environments.Apply real-world recovery tools like reflog, stash, and cherry-pick.