Sefism is free for learners. We are here to help you grow, one step at a time.Join for free
Sefism.

Cheat sheet · Foundations

Git cheat sheet

Opens with credits

A quick-revision book on Git, from the model underneath (working tree, index, commits, refs) to branching, rebasing, remotes, undoing mistakes and team workflows. Read a chapter before a project or when a command surprises you, and use the glossary to refresh a term you half remember.

Curated by Tauseef Fayyaz9 chapters65 concepts87 glossary terms

Chapters

9 chapters · 65 concepts

  1. 1How Git thinksGit makes sense once you know what it stores: snapshots of your files, linked into a history, with movable names pointing into that history. Every command in this sheet moves data between these places.7 concepts
  2. 2Setup and everyday commandsConfigure Git once, then most days are a loop of status, add, commit and push. These are the commands you will type most often.7 concepts
  3. Branching, merging and rebasingBranches let work happen in parallel; merge and rebase bring it back together. Knowing which to use, and how to resolve a conflict calmly, is most of day-to-day Git skill.8 conceptsOpens with credits
  4. Remotes: fetch, pull and pushA remote is another copy of the repository, usually on GitHub or GitLab. Git never talks to it unless you fetch, pull or push, so knowing what each does avoids most surprises.7 conceptsOpens with credits
  5. Undoing thingsAlmost nothing committed in Git is truly lost. The right undo depends on where the mistake lives: the working tree, the index, a local commit or a pushed commit.7 conceptsOpens with credits
  6. History and inspectionGit history answers why code is the way it is, who to ask, and when a bug arrived. These commands turn the log into answers.7 conceptsOpens with credits
  7. Tags, releases and code reviewHosting platforms add review and release features on top of Git. Pull requests on GitHub and merge requests on GitLab are the same idea with different names.7 conceptsOpens with credits
  8. Workflows and commit hygieneA workflow is the team agreement on how branches, reviews and releases fit together. Good commits make any workflow easier to live with.7 conceptsOpens with credits
  9. Ignoring, large files, signing and worktreesThe features you need once a project grows: keeping junk and secrets out, handling big binary files, proving who made a commit and working on two branches at once.8 conceptsOpens with credits
  10. 10Glossary, A to ZEvery concept in the sheet and the smaller terms it uses, in one list.87 terms

About this sheet

How Git stores your work, the everyday commands, branching, undoing mistakes, remotes, reviews and team workflows.

Picked from the other libraries by shared topics.

Project structures

See all
Work with me

Stuck on something specific?

Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.

  • 1:1 Mentorship
  • Fresh Graduate Mentorship
  • Career Guidance

Brand deals, promos and partnerships: tauseeffayyaz@gmail.com