diff --git a/src/day_3/notes.md b/src/day_3/notes.md index 2a0586a..48ab2a0 100644 --- a/src/day_3/notes.md +++ b/src/day_3/notes.md @@ -50,8 +50,38 @@ if you want to stage all changes. ## git revert + ## git cherry-pick +### Description + +The `git cherry-pick` command applies a specific commit from one branch to another. This can be useful for undoing changes, applying bug fixes to a different branch, or picking out specific changes from a merge commit. + +### Usage + +The basic syntax for the `git cherry-pick` command is: + +```bash +git cherry-pick +``` +where `` is the SHA-1 hash of the commit you want to cherry-pick. You can also use the `-n` option to preview the changes without actually applying them. + +For example, to cherry-pick the commit with the SHA-1 hash `1234567890abcdef`, you would run the following command: + +```bash +git cherry-pick 1234567890abcdef +``` + +### Options + +The `git cherry-pick` command has a few options that you can use to customize its behavior: + +* `-n`: Preview the changes without actually applying them. +* `-e`: Edit the commit message before applying it. +* `-s`: Sign the commit with your GPG key. +* `-S[]`: Sign the commit with the specified GPG key. + + ## git remote ## git blame