I only included things that I actually do in the cheat sheet (with a couple of exceptions like git push -u, which I only don't use because I have push.autoSetupRemote true configured) but there are a lot of other useful-looking tips in that thread that I don't personally use
the only other things in this cheat sheet that I personally don't use are git switch and git restore, which I actually think seem like great choices (the fact that git checkout THING just GUESSES if you want to switch to a branch or restore an old version of the file is kind of scary! git switch doesn't do that! and git checkout's syntax is just really weird!), but I'm used to git checkout and it doesn't cause me a lot of problems so I haven't been motivated to change my ways
@b0rk One of my best friends who doesn't work in tech just asked if I could help them better understand git, and I immediately thought of this post. Thank you!! 💖
@b0rk maybe it's just me, but somehow I missed a short mention of "git diff" or a pointer to the "diff staged/unstaged changes" section in "know where you are" (or maybe in "prepare to commit"?), as that will show you what you are about to commit – which is usually what I really want to do to prevent doing something stupid. But as I said, maybe that's just me.
[Edit: or maybe move the "diff staged/unstaged changes" between "know where you are" and "prepare to commit"?]
Add comment