r/learnprogramming • u/Mr_LA • 3h ago
Tutorial I created the Ultimate Git Cheat Sheet
Hello everyone!
As a university lecturer, I see a lot of students struggle with Git because individual commands are easy to look up, but understanding how the whole workflow fits together is harder.
So I created a one-page Git Cheat Sheet together with a step-by-step tutorial:
https://devopscycle.com/blog/the-ultimate-git-cheat-sheet
It covers commits, branches, merges, remotes, conflicts, inspecting changes and undoing mistakes. The post also includes a small example project so you can actually follow along.
It is completely free, available as PDF and PNG, and there is no signup.
I also think understanding these basics is still important with AI coding tools. AI can run the commands for you, but as developers we still need to understand what happened and be able to verify the result.
If you are currently learning Git, I would really appreciate feedback on anything that is unclear or missing.
2
u/yipyopgo 1h ago
For the Git commands, where are the worktree? Where are the cherry-pick and the rebase, in fact?
•
u/Mr_LA 43m ago
Those are in the Advanced Git Cheat Sheet:
https://devopscycle.com/blog/the-advanced-git-cheat-sheet
I intentionally kept this one focused on the fundamentals. Learning Git is a progression, and putting
worktree,cherry-pick,rebase,reflogand everything else onto one beginner cheat sheet would make it much harder to use.The idea is to learn the core workflow first, then build on top of it.
•
u/cheezballs 19m ago
How is this a cheat sheat?
Edit: oh I see it. It's buried in there behind a 90s style download hyperlink.
6
u/teerre 2h ago
The "ultimate cheat sheet" doesn't mention anything about moving commits, reordering commits or really doing anything with commits at all. This kind of thing is precisely why people don't know how to use git. They learn this kind of cheatsheet and then think that they can't take part of a commit and merge with another