a git cheat sheet

really appreciated everyone's suggestions on the previous thread! https://social.jvns.ca/@b0rk/112276852440106066

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

Julia Evans (@[email protected])

Attached: 1 image working on a draft of a git cheat sheet, what's missing? most interested in relatively "basic" things in git that you always forget how to do. Right now I think the push/pull section is by far the weakest

Mastodon
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 I just made the turn to git switch in the last 6 months or so. Old habits are hard to kill, but what motivated me is writing a CLI tool for my team that does some git stuff, and I wanted it to be very transparent about what it did so I have it print out what it is doing, and so went with "switch." Not that people actually pay any attention to the tool's output anyway, but I like to pretend people read and that I'm being helpful 🙂