Here's a preview from my zine, Oh Shit, Git! If you want to see more comics like this, sign up for my saturday comics newsletter or browse more comics!
read the transcript!
-
Stash any uncommitted changes (so they don’t get mixed up with the changes from the commit):
git stash -
Undo your most recent commit:
git reset HEAD^
(safe: this points your branch at the parent commit but doesn’t change any files) -
Use
git addto pick and choose which files you want to commit and make your new commits! -
Get your uncommitted changes back:
git stash pop
person: you can use git add -p if you want to commit some changes to a file but not others!