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!

  • @RandomDevOpsDude
    link
    English
    3
    edit-2
    1 year ago

    This is an awesome graphic!

    At one point I got in the habit of stash apply rather than stash 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.

  • JackbyDev
    link
    English
    11 year ago

    Also, teaching people that the staged files are like a commit in progress helps folks.