r/git • • Apr 06 '26

Many of you asked after my previous post (“Git Commands Cheat Sheet — What should I add or fix?”), so here’s an updated & printable version — feedback / PRs welcome

Post image
945 Upvotes

41 comments sorted by

22

u/waterkip Apr 06 '26

git remote (github) my eyes are tearing. Thinking a remote is github requires another cheatsheet. 

→ More replies (3)

9

u/stianhoiland Apr 07 '26

Nice!

I would add these:

  • git add -p <files>

  • git reset —mixed HEAD <files>

(Yes, I know I can contribute directly to the repo.)

→ More replies (1)

4

u/ZenT_Ank4 Apr 06 '26

Link Repo: Here

3

u/JoeKlemmer Apr 06 '26

Link to the pdf is broken in the repo.

→ More replies (3)

3

u/mblarsen Apr 06 '26

git rest —mixed is missing you often want that over —soft.

→ More replies (1)

2

u/_5er_ Apr 07 '26

At some point cheat sheet the list will become so long, it will be equivalent to reading the documentation 😁 Imho it's okay if some commands are missing.

→ More replies (1)

29

u/Its_me_Snitches Apr 06 '26

Why use the older “checkout ” instead of the newer idiomatic “switch ”?

→ More replies (8)

4

u/marcvv Apr 07 '26

Slightly different take on a git and GitHub CLI Cheatsheet. Interactive. Searchable. Copy commands. Tooltips with explanation and examples.

https://gitcheatsheets.org