1
0
Fork 0
mirror of https://codeberg.org/Mo8it/How_To_Linux.git synced 2024-10-18 09:42:38 +00:00

Add example with graph visualization

This commit is contained in:
Michail Kravchenko 2023-08-17 11:36:36 +02:00
parent a54733de56
commit 39c5f1d7cf

View file

@ -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: