Skip to content

Commit fad9ff9

Browse files
committed
Add node diagrams of where different bits of data are.
1 parent 931c1b0 commit fad9ff9

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed

episodes/02-branching.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,20 @@ config:
133133
merge large_feature
134134
```
135135

136+
An alternative way of viewing this workflow is:
137+
138+
```mermaid
139+
graph TD
140+
main --> |switch/checkout| lfb["feature branch"]
141+
lfb --> |push| rfb["feature branch"]
142+
subgraph github
143+
rfb --> |"pull request (PR)"| main
144+
end
145+
subgraph local["my computer"]
146+
lfb
147+
end
148+
```
149+
136150
-----------------------------------------
137151

138152
### Forking
@@ -143,6 +157,26 @@ You develop your changes using this fork.
143157
When a change is ready you open a pull request to contribute the changes
144158
back to the original repository.
145159

160+
```mermaid
161+
graph BT
162+
subgraph local["my computer"]
163+
lfb
164+
end
165+
subgraph github
166+
subgraph "my fork"
167+
rfb
168+
mm["my copy of main"]
169+
end
170+
rfb --> |"pull request (PR)"| main
171+
main --> |"sync"| mm
172+
subgraph upstream
173+
main
174+
end
175+
end
176+
mm --> |switch/checkout| lfb["feature branch"]
177+
lfb --> |push| rfb["feature branch"]
178+
```
179+
146180
#### Pros
147181

148182
- Removes the need to give all collaborators adequate permissions
@@ -210,6 +244,35 @@ merged onto the `develop` and `main` branches.
210244
merge release
211245
```
212246

247+
Or, alternatively:
248+
249+
```mermaid
250+
graph BT
251+
subgraph local["my computer"]
252+
lfb
253+
lbfb
254+
end
255+
subgraph github
256+
subgraph "my fork"
257+
md["my copy of develop"]
258+
rfb
259+
rbfb
260+
mm["my copy of main"]
261+
end
262+
rfb --> |"pull request (PR)"| develop
263+
rbfb --> |"pull request (PR)"| main
264+
develop --> |"sync"| md
265+
main --> |"sync"| mm
266+
subgraph upstream
267+
develop <--> |sync| main
268+
end
269+
end
270+
md --> |switch/checkout| lfb["feature branch"]
271+
lbfb --> |push| rbfb["bugfix branch"]
272+
lfb --> |push| rfb["feature branch"]
273+
mm --> |switch/checkout| lbfb["bugfix branch"]
274+
```
275+
213276
## Recommendations
214277

215278
For small projects using a Feature Branch model is normally sufficient.

0 commit comments

Comments
 (0)