Skip to content

Instantly share code, notes, and snippets.

@dannymcc
Created September 7, 2010 09:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dannymcc/568061 to your computer and use it in GitHub Desktop.
Save dannymcc/568061 to your computer and use it in GitHub Desktop.
git checkout -b some-experiment
# do some work
git commit -m 'some feature'
# do some more work
git commit -m 'some other feature'
# experiment fails
git checkout master
# start working on new thing
git commit -m 'some mundane bugifx'
# realize I need some code from my experimental branch, but not the whole thing
gitk --all
# figure out the sha-1 of the change I want
git cherry-pick the_sha1_of_some_other_feature
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment