Git & GitHub Assignments — Commit. Collaborate. Master.

Build real confidence with version control and team workflows. Each topic-wise set includes 20 Basic, 20 Intermediate, and 10 Advanced questions to take you from solo commits to production-grade collaboration.

Why practice with these assignments?

  • Move beyond theory—create repos, branch, merge, rebase, and resolve conflicts.
  • Learn safe history edits, release tagging, patching, and recovery.
  • Master GitHub collaboration: Issues, Pull Requests, Reviews, Actions, and Releases.
  • Prepare for interviews and real teams with tasks that mirror day-to-day workflows.

How it works

  1. Pick a topic from the list.
  2. Attempt questions in order: Basic → Intermediate → Advanced.
  3. Practice locally; push to GitHub for remote collaboration tasks.
  4. Inspect results with status, log, diff, and GitHub PR checks.
  5. Save your best solutions as portfolio-ready examples.

Notes:

  • Focus is Git 2.x and GitHub.
  • You can complete many tasks locally; GitHub tasks need a free account.
  • Use private test repos when experimenting with history rewrites.

What you’ll achieve

  • Solid mental model of working tree → index (staging) → commits → branches → remotes.
  • Confidence with branching strategies, conflict resolution, and clean history.
  • Fluency with Pull Requests, reviews, CI pipelines, and protected branches.
  • Safety skills: recover work with reflog, restore/reset, and cherry-pick.

Who should use this page?

Beginners learning version control, students preparing for interviews, and teams standardizing on professional GitHub workflows.

Tips for success

  • Commit small, focused changes with clear messages (Conventional Commits help).
  • Prefer branches + PRs over direct pushes to main; enable protection rules.
  • Rebase your feature branch before opening a PR; avoid rewriting shared history.
  • Use interactive rebase to clean up commits before merge (squash/fixup).
  • Learn reflog—it’s your safety net for recovering work.
  • Keep .gitignore/.gitattributes close to the codebase; fix line endings early.
  • Add CI (GitHub Actions) to run tests/linters on every PR.

Ready to build real confidence in Git and GitHub? Pick a set below and start solving!

FAQs

Q1. Do I need GitHub to finish these?
Many tasks are local-only. Collaboration, pull requests, and CI tasks require a free GitHub account.

Q2. Do I need to know Git before starting?
Yes. You should be familiar with basic commands like git init, git add, git commit, and git push. The assignments build on these fundamentals.

Q3. Can I do these assignments on Windows, Mac, or Linux?
Yes. Git works on all platforms. Just install Git, configure your username and email, and you are ready to go.

Q4. How do I verify correctness?
Use commands like git status, git log --graph --oneline --decorate, git diff, and GitHub PR checks. Ensure CI pipelines pass and branch protection rules are satisfied.

Q5. Is it safe to rewrite history?
Rewrite history only on private or unshared branches. Never rewrite history on branches that others have already pulled.

Q6. Are there solutions available?
Yes. Selected topics include reference flows and example commands. Review them only after attempting the tasks yourself.

Q7. What topics are covered in these assignments?
You will practice branching, merging, rebasing, pull requests, collaboration workflows, CI/CD basics, and handling merge conflicts.

Q8. How much time should I spend per assignment?
Plan 10–40 minutes per difficulty band per topic. CI, monorepo, and advanced branching tasks may take longer.

Q9. Do I need external tools besides Git and GitHub?
Not always. Most assignments rely only on Git CLI and GitHub UI. Some tasks may recommend CI services like GitHub Actions.

Q10. Can these assignments help me in job interviews?
Absolutely. Git & GitHub are required skills in most companies. These assignments give you hands-on experience with workflows used in real projects.