diff --git a/src/day_3/notes.md b/src/day_3/notes.md index 48ab2a0..89f56c8 100644 --- a/src/day_3/notes.md +++ b/src/day_3/notes.md @@ -72,6 +72,32 @@ For example, to cherry-pick the commit with the SHA-1 hash `1234567890abcdef`, y git cherry-pick 1234567890abcdef ``` +Example with visualization of the git log graph: + +- Let's assume the current branch state: +```bash + a - b - c - d Main + \ + e - f - g Feature +``` + +- Ensure that we'are working in the `main` branch: +```bash +git checkout main +``` + +- Then let's execute the following `cherry-pick` command: +```bash +git cherry-pick f +``` + +- Once executed, branch state will change to: +```bash + a - b - c - d - f Main + \ + e - f - g Feature +``` + ### Options The `git cherry-pick` command has a few options that you can use to customize its behavior: