mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-15 13:29:40 +02:00
documentation added, Tests Fixed
This commit is contained in:
@@ -366,6 +366,8 @@ A few important rules to note here are:
|
|||||||
1. You need to provide the `id` for an existing commit to be cherry-picked. If given commit id does not exist it will result in an error. For this, make use of the `commit id:$value` format of declaring commits. See the examples from above.
|
1. You need to provide the `id` for an existing commit to be cherry-picked. If given commit id does not exist it will result in an error. For this, make use of the `commit id:$value` format of declaring commits. See the examples from above.
|
||||||
2. The given commit must not exist on the current branch. The cherry-picked commit must always be a different branch than the current branch.
|
2. The given commit must not exist on the current branch. The cherry-picked commit must always be a different branch than the current branch.
|
||||||
3. Current branch must have at least one commit, before you can cherry-pick, otherwise it will cause an error is throw.
|
3. Current branch must have at least one commit, before you can cherry-pick, otherwise it will cause an error is throw.
|
||||||
|
4. When cherry-picking a merge commit, providing a parent commit ID is mandatory. If the parent attribute is omitted or an invalid parent commit ID is provided, an error will be thrown.
|
||||||
|
5. The specified parent commit must be an immediate parent of the merge commit being cherry-picked.
|
||||||
|
|
||||||
Let see an example:
|
Let see an example:
|
||||||
|
|
||||||
@@ -373,14 +375,17 @@ Let see an example:
|
|||||||
gitGraph
|
gitGraph
|
||||||
commit id: "ZERO"
|
commit id: "ZERO"
|
||||||
branch develop
|
branch develop
|
||||||
|
branch release
|
||||||
commit id:"A"
|
commit id:"A"
|
||||||
checkout main
|
checkout main
|
||||||
commit id:"ONE"
|
commit id:"ONE"
|
||||||
checkout develop
|
checkout develop
|
||||||
commit id:"B"
|
commit id:"B"
|
||||||
checkout main
|
checkout main
|
||||||
|
merge develop id:"MERGE"
|
||||||
commit id:"TWO"
|
commit id:"TWO"
|
||||||
cherry-pick id:"A"
|
checkout release
|
||||||
|
cherry-pick id:"MERGE" parent:"B"
|
||||||
commit id:"THREE"
|
commit id:"THREE"
|
||||||
checkout develop
|
checkout develop
|
||||||
commit id:"C"
|
commit id:"C"
|
||||||
@@ -390,14 +395,17 @@ Let see an example:
|
|||||||
gitGraph
|
gitGraph
|
||||||
commit id: "ZERO"
|
commit id: "ZERO"
|
||||||
branch develop
|
branch develop
|
||||||
|
branch release
|
||||||
commit id:"A"
|
commit id:"A"
|
||||||
checkout main
|
checkout main
|
||||||
commit id:"ONE"
|
commit id:"ONE"
|
||||||
checkout develop
|
checkout develop
|
||||||
commit id:"B"
|
commit id:"B"
|
||||||
checkout main
|
checkout main
|
||||||
|
merge develop id:"MERGE"
|
||||||
commit id:"TWO"
|
commit id:"TWO"
|
||||||
cherry-pick id:"A"
|
checkout release
|
||||||
|
cherry-pick id:"MERGE" parent:"B"
|
||||||
commit id:"THREE"
|
commit id:"THREE"
|
||||||
checkout develop
|
checkout develop
|
||||||
commit id:"C"
|
commit id:"C"
|
||||||
|
@@ -244,6 +244,8 @@ A few important rules to note here are:
|
|||||||
1. You need to provide the `id` for an existing commit to be cherry-picked. If given commit id does not exist it will result in an error. For this, make use of the `commit id:$value` format of declaring commits. See the examples from above.
|
1. You need to provide the `id` for an existing commit to be cherry-picked. If given commit id does not exist it will result in an error. For this, make use of the `commit id:$value` format of declaring commits. See the examples from above.
|
||||||
2. The given commit must not exist on the current branch. The cherry-picked commit must always be a different branch than the current branch.
|
2. The given commit must not exist on the current branch. The cherry-picked commit must always be a different branch than the current branch.
|
||||||
3. Current branch must have at least one commit, before you can cherry-pick, otherwise it will cause an error is throw.
|
3. Current branch must have at least one commit, before you can cherry-pick, otherwise it will cause an error is throw.
|
||||||
|
4. When cherry-picking a merge commit, providing a parent commit ID is mandatory. If the parent attribute is omitted or an invalid parent commit ID is provided, an error will be thrown.
|
||||||
|
5. The specified parent commit must be an immediate parent of the merge commit being cherry-picked.
|
||||||
|
|
||||||
Let see an example:
|
Let see an example:
|
||||||
|
|
||||||
@@ -251,14 +253,17 @@ Let see an example:
|
|||||||
gitGraph
|
gitGraph
|
||||||
commit id: "ZERO"
|
commit id: "ZERO"
|
||||||
branch develop
|
branch develop
|
||||||
|
branch release
|
||||||
commit id:"A"
|
commit id:"A"
|
||||||
checkout main
|
checkout main
|
||||||
commit id:"ONE"
|
commit id:"ONE"
|
||||||
checkout develop
|
checkout develop
|
||||||
commit id:"B"
|
commit id:"B"
|
||||||
checkout main
|
checkout main
|
||||||
|
merge develop id:"MERGE"
|
||||||
commit id:"TWO"
|
commit id:"TWO"
|
||||||
cherry-pick id:"A"
|
checkout release
|
||||||
|
cherry-pick id:"MERGE" parent:"B"
|
||||||
commit id:"THREE"
|
commit id:"THREE"
|
||||||
checkout develop
|
checkout develop
|
||||||
commit id:"C"
|
commit id:"C"
|
||||||
|
Reference in New Issue
Block a user