Git and GitHub Practice Assignments: Module-wise Exercises from Beginner to Advanced

You learn Git by typing commands, not by reading about them. This page gives you a checkpoint exercise for every module of the Git and GitHub course, so you can prove each skill before moving on.

Advertisement

📖 What You’ll Learn: how to use the checkpoints, exercises for getting started, Git basics, remotes, branching and merging, collaboration, team workflows, advanced Git, security, GitHub Actions, tools, projects and interview preparation.


🏋️ How to Use This Page

Every lesson in the Git and GitHub Tutorial ends with its own assignment. This page adds one checkpoint per module: a slightly bigger exercise that combines the lessons in that module. Do it before moving on.

Rules:

  • Use a dedicated practice repository on GitHub (for example git-practice).
  • Do the tasks in the terminal first; use VS Code or the GitHub website only where the task says so.
  • After each checkpoint, run git log --oneline --graph --all and make sure you can explain every line.
LevelModulesBadge
🟢 Beginner1 to 3Git User
🔵 Intermediate4 to 6Team Collaborator
🟠 Advanced7 to 10Git and CI/CD Pro
🟣 Career11 to 12Interview Ready

🟢 Module 1 Checkpoint: Getting Started

Lessons: What Is Git and GitHub, Install Git, Install on macOS, Terminal commands, git config, SSH keys, GitHub fundamentals

  1. Install Git, set name, email, editor, default branch main and the lg alias.
  2. Create a GitHub account with 2FA and connect with an SSH key; prove it with ssh -T git@github.com.
  3. Write a one-paragraph explanation of Git vs GitHub in your own words.

🟢 Module 2 Checkpoint: Git Basics

Lessons: init, add, commit, staging area, log and diff, .gitignore, undo changes

  1. Create a repository with at least 6 meaningful commits.
  2. Add a .gitignore that ignores node_modules/, .env and reports/; prove it with git check-ignore -v.
  3. Commit something by mistake, then: amend a message, unstage a file, undo a commit with reset --soft, and undo another with revert.
  4. Find a specific change using git log -S and show it with git show.

🟢 Module 3 Checkpoint: Remotes

Lessons: git remote, clone, push, pull, fetch vs pull, push an existing project

  1. Push an existing local folder to a new GitHub repository.
  2. Clone it into a second folder; push from one and fetch, inspect and merge in the other.
  3. Create diverging commits and solve “rejected (fetch first)” once with merge and once with pull --rebase.

🔵 Module 4 Checkpoint: Branching and Merging

Lessons: branches, merge, merge conflicts, rebase, stash, cherry-pick, tags

  1. Create three feature branches; merge one fast-forward, one with --no-ff and one with --squash; compare the graph.
  2. Create and resolve a conflict by merge, then another by rebase.
  3. Stash unfinished work, switch branch, fix something, and pop the stash.
  4. Cherry-pick a fix from a feature branch to a release/0.1 branch.
  5. Tag v0.1.0 (annotated), push it and create a GitHub Release.

🔵 Module 5 Checkpoint: Collaboration

Lessons: pull requests, code review, forks, issues and projects, README

  1. Open two pull requests with good descriptions and Closes #n links; review one with a suggestion and Request changes.
  2. Fork a public repository, sync it with upstream, and open a PR (to your own second repo if you prefer).
  3. Create a Project board, labels and a milestone; move issues as PRs merge.
  4. Write a complete README with badges, setup steps and a project structure section.

🔵 Module 6 Checkpoint: Team Workflows

Lessons: branching strategies, commit messages, Git in VS Code, best practices

  1. Write a CONTRIBUTING.md choosing GitHub Flow or Git Flow, with branch names and Conventional Commits.
  2. Simulate Git Flow with develop, a release branch and a hotfix.
  3. Do one full cycle (branch, commit, push, PR, resolve a conflict) using only VS Code.

🟠 Module 7 Checkpoint: Advanced Git

Lessons: interactive rebase, reflog, bisect, hooks, submodules, internals

  1. Turn a branch with 8 messy commits into 3 clean ones with rebase -i (squash, reword, drop).
  2. Delete a branch and run reset --hard by “mistake”; recover both with the reflog.
  3. Find a commit that introduced a bug with git bisect run.
  4. Add a pre-commit hook (or Husky) that blocks test.only and a commit-msg check.
  5. Follow a commit to its tree and a blob with git cat-file -p.

🟠 Module 8 Checkpoint: Security and Administration

Lessons: tokens, branch protection, CODEOWNERS and templates, security

  1. Create a fine-grained token limited to one repository, use it, then revoke it.
  2. Protect main with a ruleset requiring a PR, one approval and a status check.
  3. Add CODEOWNERS, an issue form and a PR template.
  4. Enable Dependabot, secret scanning with push protection, and CodeQL on a public repo.

🟠 Module 9 Checkpoint: GitHub Actions

Lessons: roadmap, fundamentals, workflow syntax, example pipelines, secrets and environments, intermediate concepts, matrix, cache, artifacts, reusable workflows, deployment, practice projects

  1. Build a workflow with push, pull_request, schedule and workflow_dispatch triggers and two dependent jobs.
  2. Add a matrix of 3 browsers with fail-fast: false, npm caching and an artifact per browser.
  3. Move the test job into a reusable workflow and call it from two pipelines.
  4. Create staging and production environments with an approval, and deploy a static page to GitHub Pages.

🟠 Module 10 Checkpoint: Tools and Ecosystem

Lessons: GitHub CLI, GitHub Pages, Codespaces, Copilot

  1. Create a repo, open a PR, check CI and merge it entirely with gh.
  2. Publish your portfolio at <username>.github.io.
  3. Add a devcontainer.json and run a project’s tests in a codespace.
  4. Use Copilot to draft a test and a PR description; review and improve both.

🟣 Module 11 and 12 Checkpoint: Projects and Interviews

  1. Complete Project 1: Team Workflow and Project 2: CI/CD Pipeline and pin both repositories on your GitHub profile.
  2. Practise the GitHub interview questions, Git questions for experienced and GitHub Actions questions out loud.
  3. Keep the Git cheat sheet open while you work for a week, then try without it.

❓ FAQ

🤔 Where can I practise Git and GitHub for free?

In your own free GitHub repositories, using the module checkpoints on this page and the assignments at the end of each lesson.

🤔 Do I need a team to practise GitHub collaboration?

No. Use a second clone or a second GitHub account to simulate teammates, as in the team workflow project.

🤔 How long does it take to finish all checkpoints?

At about an hour a day, most learners finish them, including the two projects, in one to two months.

🤔 Are solutions provided?

Each linked lesson contains the commands and examples needed. Use git log, the GitHub UI and the cheat sheet to check your work.


🎯 Next Steps

🎬 Learn Git and GitHub step by step: watch the series on YouTube!

Subscribe to SqaToolsByDY • Practice on sqatools.in

1 thought on “Git and GitHub Practice Assignments: Module-wise Exercises from Beginner to Advanced”

Leave a Comment