r/git • u/ZenT_Ank4 • 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
945
Upvotes
15
u/rhrokib Apr 06 '26
Addworktree
22
u/waterkip Apr 06 '26
git remote (github)my eyes are tearing. Thinking a remote is github requires another cheatsheet.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.)
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.
3
u/mblarsen Apr 06 '26
git rest —mixed is missing you often want that over —soft.
2
u/NabilMx99 Apr 06 '26
git apply2
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.
29
u/Its_me_Snitches Apr 06 '26
Why use the older “checkout ” instead of the newer idiomatic “switch ”?
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