πHow to apply a recipe with git cherry pick
Last updated
Last updated
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_pro
repo then you should be fine. Just run git fetch
.
If you don't have petal_pro
as a git remote (eg. you deleted .git
and re-initialized it, or if you used Petal Pro as a template), then run this to re-attach it:
Now just run the cherry-pick
command.
The code from that commit should now be applied to your project.