Comment on page
How to apply a recipe with git cherry pick
Cherry picking means to apply a specific git commit to your working copy. We have made a number of "recipes" that are basically git branches that are 1 commit long. This means you can easily apply them to your project by cherry picking them.
To apply a commit we need to get its SHA, which is basically an ID for the commit. If you're proficient in git you can probably do this yourself in the terminal or whatever GUI you use. But here's how to do it in Github.
Firstly, go to the "Commits" page:
Then select the recipe branch, and copy the SHA of the latest commit on that branch.
Git needs to be connected to our Github repository and have fetched the latest commits from it. That way, when you run the cherry-pick command, it can actually find the commit to apply.
If you cloned the
petal_prorepo then you should be fine. Just run
If you don't have
petal_proas a git remote (eg. you deleted
.gitand re-initialized it, or if you used Petal Pro as a template), then run this to re-attach it:
Now just run the
# This commits it to your project
git cherry-pick <SHA_you_copied>
# If you don't want to commit it, but just have the code sitting in your working directory
git cherry-pick <SHA_you_copied> --no-commit
The code from that commit should now be applied to your project.