Skip to content

Commit

Permalink
Add node diagrams of where different bits of data are.
Browse files Browse the repository at this point in the history
  • Loading branch information
wxtim committed Dec 3, 2024
1 parent 931c1b0 commit fad9ff9
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions episodes/02-branching.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,20 @@ config:
merge large_feature
```

An alternative way of viewing this workflow is:

```mermaid
graph TD
main --> |switch/checkout| lfb["feature branch"]
lfb --> |push| rfb["feature branch"]
subgraph github
rfb --> |"pull request (PR)"| main
end
subgraph local["my computer"]
lfb
end
```

-----------------------------------------

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

```mermaid
graph BT
subgraph local["my computer"]
lfb
end
subgraph github
subgraph "my fork"
rfb
mm["my copy of main"]
end
rfb --> |"pull request (PR)"| main
main --> |"sync"| mm
subgraph upstream
main
end
end
mm --> |switch/checkout| lfb["feature branch"]
lfb --> |push| rfb["feature branch"]
```

#### Pros

- Removes the need to give all collaborators adequate permissions
Expand Down Expand Up @@ -210,6 +244,35 @@ merged onto the `develop` and `main` branches.
merge release
```

Or, alternatively:

```mermaid
graph BT
subgraph local["my computer"]
lfb
lbfb
end
subgraph github
subgraph "my fork"
md["my copy of develop"]
rfb
rbfb
mm["my copy of main"]
end
rfb --> |"pull request (PR)"| develop
rbfb --> |"pull request (PR)"| main
develop --> |"sync"| md
main --> |"sync"| mm
subgraph upstream
develop <--> |sync| main
end
end
md --> |switch/checkout| lfb["feature branch"]
lbfb --> |push| rbfb["bugfix branch"]
lfb --> |push| rfb["feature branch"]
mm --> |switch/checkout| lbfb["bugfix branch"]
```

## Recommendations

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

0 comments on commit fad9ff9

Please sign in to comment.