mirror of
https://codeberg.org/Mo8it/How_To_Linux.git
synced 2024-11-21 19:18:02 +00:00
Add example with graph visualization
This commit is contained in:
parent
a54733de56
commit
39c5f1d7cf
1 changed files with 26 additions and 0 deletions
|
@ -72,6 +72,32 @@ For example, to cherry-pick the commit with the SHA-1 hash `1234567890abcdef`, y
|
||||||
git cherry-pick 1234567890abcdef
|
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
|
### Options
|
||||||
|
|
||||||
The `git cherry-pick` command has a few options that you can use to customize its behavior:
|
The `git cherry-pick` command has a few options that you can use to customize its behavior:
|
||||||
|
|
Loading…
Reference in a new issue