Section 1: Lab: Git Fundamentals and Git Internals
- Distributed version control and the working directory, staging area and repository
- Configure Git with git config and use the core commands init, status, add, commit, log and diff, plus .gitignore
- Writing good commit messages and the Conventional Commits format
- The Git object model (blob, tree, commit, tag), together with references, branches and HEAD
- Lab: create the TeamBoard Web repository, then inspect the objects in .git with git cat-file
Section 2: Lab: Branching, Merging and Conflict Resolution
- Create and switch branches with git switch and git branch
- Fast-forward merge, three-way merge and rebase, and when to use each
- Resolve conflicts from the command line and in VS Code, then stage them with git add --resolved (Git 2.56)
- Clean up merged branches and use tags to mark versions
- Lab: create a conflict between two branches and resolve it correctly both ways
Section 3: Lab: History Rewriting for a Clean History
- Fix the latest commit with git commit --amend
- Interactive rebase (git rebase -i): squash, fixup, reword, reorder and drop
- Apply selected commits to another branch with git cherry-pick
- The golden rule: rewrite history only on private branches, and push safely with --force-with-lease
- Lab: squash a messy set of commits into a readable series before handing in work
Section 4: Lab: Debugging History, Recovery and Git Hooks
- Advanced log filtering and graph view, git blame, git log -S and git grep
- Find the commit that introduced a bug with git bisect, step by step and automatically with git bisect run
- git restore, git stash and the difference between revert and reset (soft, mixed, hard)
- Recover lost commits or branches with git reflog
- Client-side Git hooks such as pre-commit and commit-msg to check work before committing
Section 5: Day 1 Workshop: TeamBoard Web on Your Own Machine
- Clone a prepared repository with a messy commit history and a hidden bug
- Build a new feature on a separate branch, then create and resolve a merge conflict
- Tidy the history with interactive rebase and use git bisect to find the commit that broke the page
- Workshop: recover a deleted branch with reflog and install a hook that checks the commit message format