📋 Git Commands Cheat Sheet

Essential Git commands for the GitHub Foundations exam.

Why This Cheat Sheet Matters for GH-FOUND

This cheat sheet covers the most important Git Version Control concepts tested on the GH-FOUND (Foundations) certification exam. It contains 1 sections with 10 key points. Use this as a quick-reference guide during your final review sessions.

1Sections
10Key Points

Core Commands

  • git init — initialize a new repository.
  • git clone <url> — copy a remote repository locally.
  • git add . / git add <file> — stage changes.
  • git commit -m "message" — commit staged changes.
  • git push origin <branch> — push commits to remote.
  • git pull — fetch and merge changes from remote.
  • git branch <name> — create new branch.
  • git checkout <branch> / git switch <branch> — switch branches.
  • git merge <branch> — merge branch into current branch.
  • git log --oneline — compact commit history.

Practice Git Version Control Questions

Put your knowledge to the test with practice questions.

GitHub YAML & Markdown Reference

GitHub certifications frequently test your knowledge of YAML syntax for Actions workflows and Markdown for documentation. Key YAML elements include workflow triggers (on:), jobs, steps, uses, run, env, and secrets. Understand the difference between workflow-level, job-level, and step-level configurations. For Markdown, know GitHub Flavoured Markdown (GFM) extensions like task lists, tables, and collapsible sections.

More GH-FOUND Cheat Sheets