Cherry Pick
git cherry-pick copies one commit onto the current branch.
Example
echo one > a.txt && git add a.txt && git commit -qm 'first'
git switch -q -c feat
echo f > f.txt && git add f.txt && git commit -qm 'feat only'
git switch -q main
git cherry-pick feat >/dev/null
git log --format=%s -n 1Result
feat only
Exercise
Copy a commit.
git commit
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.