Git diagram demo
---
title: Simple "branch and merge"
---
gitGraph:
commit
branch newbranch
checkout newbranch
commit
checkout main
merge newbranch
---
title: Continuous development
---
gitGraph:
commit
branch develop
checkout develop
commit
checkout main
merge develop
checkout develop
commit
checkout main
merge develop
---
title: Two-way merges
---
gitGraph:
commit
branch develop
checkout develop
commit
checkout main
merge develop
commit
checkout develop
merge main
commit
checkout main
merge develop
---
title: Cherry-pick
---
gitGraph:
commit
branch newbranch
checkout newbranch
commit id: "Pick me"
checkout main
commit
checkout newbranch
commit
checkout main
cherry-pick id: "Pick me"
merge newbranch
---
title: Three branches
---
gitGraph:
commit
branch develop
checkout develop
commit
branch feature
checkout feature
commit
checkout main
merge feature id:"Direct to main"
checkout develop
merge feature
commit
checkout main
merge develop