Record source changes, compare revisions and collaborate through branches.

Before starting: Files, folders, and a text editor.

Practice project: Version a small project and practice branch changes in a disposable copy.

Module 1: Version Control Foundations & Git Architecture

  1. Git Overview, Version Control Systems (CVCS vs DVCS) & Architecture
  2. Git Installation, Shell Environment & Initial Configuration (`git config`)
  3. Git Plumbing vs Porcelain & The Three Trees Architecture
  4. Initializing a Repository (`git init`) & Project Scaffolding
  5. Cloning Remote Repositories (`git clone` & Shallow Clones)

Module 2: Basic Snapshotting & Everyday Workflow

  1. Inspecting Project Status & Changes (`git status`)
  2. The Staging Area / Index (`git add` & Interactive Patch `git add -p`)
  3. Committing Snapshots & Crafting Semantic Commit Messages (`git commit`)
  4. Viewing Working Tree & Staged Differences (`git diff`)
  5. Removing & Renaming Tracked Files (`git rm` & `git mv`)

Module 3: Ignoring Files & Commit History Inspection

  1. Ignoring Unwanted Files with `.gitignore` & Global Ignore Rules
  2. Exploring History with `git log` (Formatting, Graphs, Oneline, Authors)
  3. Filtering Logs by Date, Author, File Path & Regex Commit Search
  4. Inspecting Individual Commits & Metadata (`git show`)
  5. File Archaeology & Line-by-Line Authorship (`git blame`)

Module 4: Branching & Context Switching

  1. Git Branching Model & Pointer Mechanics (`git branch`)
  2. Switching Branches & Detached HEAD State (`git switch` & `git checkout`)
  3. Modern File Restoration (`git restore` vs `git checkout`)
  4. Temporary Context Switching with `git stash` (Push, Pop, List, Apply, Drop)
  5. Git Worktrees for Parallel Branch Development (`git worktree`)

Module 5: Merging, Rebasing & Conflict Resolution

  1. Basic Branch Merging & Fast-Forward vs Three-Way Merge (`git merge`)
  2. Anatomy of Merge Conflicts & Resolution Workflows
  3. Three-Way Merge Tools & Re-recording Merge Resolutions (`git rerere`)
  4. Linear History with Git Rebase (`git rebase` vs `git merge`)
  5. Interactive Rebasing for Clean Commits (`git rebase -i` Squash, Reword, Drop)

Module 6: Undoing Changes & History Rewriting

  1. Amending the Last Commit (`git commit --amend`)
  2. Reverting Historical Commits Safely (`git revert`)
  3. Resetting State: Soft, Mixed & Hard (`git reset`)
  4. The Ultimate Safety Net: Git Reflog (`git reflog` & Dangling Commit Recovery)
  5. Selective Commit Transplantation with `git cherry-pick`

Module 7: Remotes, Collaboration & GitHub Workflows

  1. Managing Remote Repositories (`git remote` Add, Rename, Remove, Prune)
  2. Fetching Remote Data without Merging (`git fetch`)
  3. Integrating Remote Changes (`git pull` vs `git pull --rebase`)
  4. Publishing Local Work to Remotes (`git push` & Upstream Tracking `-u`)
  5. GitHub Pull Request Workflow, Code Reviews & Protected Branches

Module 8: Tagging, Releases & Advanced Navigation

  1. Lightweight vs Annotated Tags (`git tag` & GPG Signatures)
  2. Binary Search for Bugs with `git bisect` (Automated & Manual)
  3. Fast Substring & Regex Search across Repository (`git grep`)
  4. Monorepos & Large Repos: Sparse Checkout & Partial Clones
  5. Handling Big Assets with Git LFS (Large File Storage)

Module 9: Submodules, Subtrees & Automation Hooks

  1. Managing External Repositories with `git submodule`
  2. Seamless Dependency Inlining with `git subtree`
  3. Client-Side Git Hooks (pre-commit, commit-msg, pre-push)
  4. Modern Linting with Husky & Lint-Staged
  5. Server-Side Git Hooks & Automated CI/CD Integration

Module 10: Git Internals, Plumbing & Production Operations

  1. The `.git` Directory Layout & Storage Architecture
  2. Git Object Model: Blobs, Trees, Commits & Annotated Tags (`git cat-file`)
  3. Garbage Collection, Packfiles & Pruning (`git gc` & `git prune`)
  4. GPG / SSH Commit Signing & Identity Verification
  5. Git Disaster Recovery, Corruption Repair & Production Best Practices

Inspect Git changes before attempting recovery

Choose a recovery operation only after identifying where the useful version lives. git status describes the working tree and staging area. git diff shows unstaged tracked changes; git diff --staged shows the next snapshot. The reflog records local reference movements but is not a permanent backup. Make a copy of valuable files before destructive commands.

Git installed; use a disposable practice repository

git status --short
git diff
git diff --staged
git log --oneline -5
git reflog -5
Check the output
Output depends on your repository. These commands inspect state and do not discard your edits.

Create a temporary branch before experimenting. Describe why resetting a branch and reverting a commit have different effects on shared history.

Open the Git learning path on DevStudyHub · Play coding games on this blog

logoblog

No comments:

Post a Comment

Please do not enter any spam link in the comment box.