cross-posted from: https://programming.dev/post/223663
Hey folks!
I’ve noticed that it’s often difficult for newcomers to
git
to understand what the heck is happening and how the commands work.Here’s a flowchart that has helped me explain things in the past, and (more than once) folks have asked me for a copy of it to use as a cheat sheet. Hope it’s helpful!
This is an awesome graphic!
At one point I got in the habit of
stash apply
rather thanstash pop
.I like it since the original stash stays unmodified, and can be reapplied if needed.
I dislike it since I am bad at cleaning up my stashes and they can grow large (my own fault). Also bad at naming my stashes (i.e.
git stash save "my new stash"
) and then it gets hard to tell which is which when inspecting the stash.