Skip to Content
Navigation:

A stick figure smiling

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!

Image of a comic. To read the full HTML alt text, click "read the transcript". get the zine!
read the transcript!
  1. Check out the correct branch

git checkout correct-branch

cherry-pick makes a new commit with the same changes as *, but a different parent

  1. Add the commit you wanted to it

git cherry-pick COMMIT_ID
↑ use ‘git log wrong-branch’ to find this

  1. Delete the commit from the wrong branch.
git checkout wrong-branch 
git reset --hard HEAD^

be careful when running ‘git reset --hard!’ always run ‘git status’ first to make sure there aren’t uncommitted changes and ‘git stash’ to save them if there are