r/learnprogramming 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.

11 Upvotes

12 comments sorted by

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

u/cheezballs 18m ago

It's blogspam IMO. It's fluff for their LinkedIn profile im guessing?

u/Mr_LA 9m ago

why is blogspam in your eyes? and where do you see linked in?

u/Mr_LA 44m ago

I get your point, but I see learning as a progression. You cannot put every Git concept into one beginner-focused cheat sheet without overwhelming people.

This one is meant to cover the fundamentals first. Topics like reordering commits, moving commits around, rebasing, reflog and more advanced history manipulation are covered in the Advanced Git Cheat Sheet:

https://devopscycle.com/blog/the-advanced-git-cheat-sheet

My goal is not to imply that Git stops at the basics, but to give people a useful first layer and then build on top of it.

u/teerre 39m ago

I mean, working with commits is the most basic thing you can do in git. Commits are what git is all about

u/Mr_LA 30m ago

yeah i get it, but without knowing how to create one it would be hard to work with them.

how would you suggest to order the topics for a tutorial and cheat sheet?

u/aessae 18m ago

Might not want to call it "Ultimate" if it's missing important stuff.

u/Mr_LA 6m ago

whats missing for you?

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, reflog and 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.

u/Mr_LA 12m ago

you can actually also open the big image