Skip to content

Commit

Permalink
markdown source builds
Browse files Browse the repository at this point in the history
Auto-generated via `{sandpaper}`
Source  : 7e63174
Branch  : main
Author  : Dimitrios Theodorakis <[email protected]>
Time    : 2025-01-10 13:37:32 +0000
Message : MetOffice#45 Add in mermaid diagrams showing various workflows
  • Loading branch information
actions-user committed Jan 10, 2025
1 parent e4bcf17 commit ad5c38e
Show file tree
Hide file tree
Showing 5 changed files with 122 additions and 9 deletions.
2 changes: 1 addition & 1 deletion 02-branching.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ The next few episodes will guide you through examples of both models.
This wasn't an exhaustive list of branching models!
You can find more information using the links below:

- [From Novice to Pro: Understanding Git Branching Strategies, GitProtect](https://gitprotect.io/blog/from-novice-to-pro-understanding-git-branching-models/)
- [From Novice to Pro: Understanding Git Branching Strategies, GitProtect](https://gitprotect.io/blog/from-novice-to-pro-understanding-git-branching-strategies/)
- [What is a Git workflow?, GitLab](https://about.gitlab.com/topics/version-control/what-is-git-workflow/#forking-git-workflow)

:::::::::::::::::::::::::::::::::::::::: keypoints
Expand Down
26 changes: 26 additions & 0 deletions 04-review.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,32 @@ exercises: 10

In this section we will explore how to properly review
code and suggest changes if necessary.
Both science and code reviews happen in a Pull Request.
The general process is outlined in the diagram below:

```mermaid
sequenceDiagram
accDescr {A sequence diagram showing the process of reviewing.}
autonumber
actor Developer
actor Reviewer
Developer->>Reviewer: Request a reviewer
Reviewer->>Reviewer: #32;
Note over Reviewer: Add the reviewer<br/>to the pull request
Reviewer->>Reviewer: #32;
Note over Reviewer: Perform the review
loop
Reviewer->>Developer: Submit the review
Developer->>Developer: #32;
Note over Developer: Respond to each<br/>review comment
Developer->>Reviewer: Re-request a review
Reviewer->>Reviewer: #32;
Note over Reviewer: Respond to each review<br/>comment response
end
Reviewer->>Developer: Approve the pull request
```

Make sure you know who is in your pair.
Find your colleagues open PR on the `git-training-demo`
repository using the Pull Requests tab
Expand Down
54 changes: 54 additions & 0 deletions 05-forks.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,60 @@ on your local `main` branch.

:::

## Summary Diagram

The workflow for forking is similar to that for branching.
There are only a few differences after you've set up your fork
for the first time:

- You should open Issues on the upstream repository not your fork.
- After merging in a PR on the upstream repository you need the
added step of syncing your forks `main` branch.

```mermaid
sequenceDiagram
accDescr {A sequence diagram showing the steps for using
Forks with the branching model.}
autonumber
participant UM as upstream main
participant GHM as origin main
participant GHF as origin feature
participant M as main
UM ->> UM: #f
Note over UM: Open an Issue for the change
UM -->> GHM: #f
Note right of UM: First time: Fork the repository
GHM -->> M: #f
Note right of GHM: First time: git clone<br/>Then: git pull
create participant F as feature
M ->> F: Create a feature branch:<br/>git switch -c feature
loop
F ->> F: #f
Note over F: Develop changes:<br/>git add<br/>git commit
end
F -->> GHF: #f
Note left of F: Push to GitHub: git push<br/>The first push creates origin feature!
destroy GHF
GHF -->> UM: #f
Note left of GHF: Pull Request and then Merge.<br/>Delete origin feature branch.
UM -->> GHM: #f
Note right of UM: Sync your fork
GHM -->> M: #f
Note right of GHM: git pull
Note over F: Delete branch:<br/>git branch -d feature
box Upstream Remote - GitHub
participant UM
end
box Fork Remote - GitHub
participant GHM
participant GHF
end
box Fork - Local
participant M
participant F
end
```

:::::::::::::::::::::::::::::::::::::::: keypoints

- A fork is a server side, in our case GitHub, copy
Expand Down
41 changes: 37 additions & 4 deletions Break.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,42 @@ You've now used the Feature Branch model to:
3. Create a branch to develop your changes on
4. Make changes to your working copy
5. Open a Pull Request
6. Review changes
7. Respond to review
8. Merge the Pull Request and close the Issue
9. Tidy up your branches
6. Respond to review
7. Update your local copy and tidy up your branches

```mermaid
sequenceDiagram
accDescr {A sequence diagram showing the steps for the branching model.}
autonumber
participant GHM as origin main
participant GHF as origin feature
participant M as main
GHM -->> GHM: #f
Note over GHM: Open an Issue for the change
GHM -->> M: #f
Note right of GHM: First time: git clone<br/>Then: git pull
create participant F as feature
M ->> F: Create a feature branch:<br/>git switch -c feature
loop
F ->> F: #f
Note over F: Develop changes:<br/>git add<br/>git commit
end
F -->> GHF: #f
Note left of F: Push to GitHub: git push<br/>The first push creates origin feature!
destroy GHF
GHF ->> GHM: #f
Note left of GHF: Pull Request and then Merge.<br/>Delete origin feature branch.
GHM -->> M: #f
Note right of GHM: git pull
Note over F: Delete branch:<br/>git branch -D feature
box GitHub Remote
participant GHM
participant GHF
end
box Local
participant M
participant F
end
```

Take a break - get up and move about.
8 changes: 4 additions & 4 deletions md5sum.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
"index.md" "b0bde9e0a613102d1ae6f11c271ae32e" "site/built/index.md" "2025-01-09"
"episodes/00-repo-access.md" "69149f4f1439ae3798eab748291c5b33" "site/built/00-repo-access.md" "2025-01-09"
"episodes/01-issues.md" "a2cd906c1fd69b1be899f6e352334b0d" "site/built/01-issues.md" "2025-01-09"
"episodes/02-branching.md" "67c14934ca1f8eced9b2c82159d54842" "site/built/02-branching.md" "2025-01-09"
"episodes/02-branching.md" "16cffc6627b7b49d5cc96d02b6a388dc" "site/built/02-branching.md" "2025-01-10"
"episodes/03-feature-branch.md" "2aa2c1b8bd6bf77202e3dfecc69eca2d" "site/built/03-feature-branch.md" "2025-01-09"
"episodes/04-review.md" "90bf3c25ead2368b8664603c6667a457" "site/built/04-review.md" "2025-01-09"
"episodes/Break.md" "96f3c03ec9cd646c6366f840b7f21107" "site/built/Break.md" "2025-01-09"
"episodes/05-forks.md" "47b583e34640bfbf92abb84c2c97540c" "site/built/05-forks.md" "2025-01-09"
"episodes/04-review.md" "bc6707dc58f1ad84253b812726b54e09" "site/built/04-review.md" "2025-01-10"
"episodes/Break.md" "3f756cfaee9cc1c397381668102aaea0" "site/built/Break.md" "2025-01-10"
"episodes/05-forks.md" "b8def2a9442becd533880a3cebc319ad" "site/built/05-forks.md" "2025-01-10"
"episodes/06-conflict.md" "168a9bc9aca94e053dcca42cfaef2953" "site/built/06-conflict.md" "2025-01-10"
"episodes/07-history.md" "06de9dc87212934f2d7fc6ea7bbd97b2" "site/built/07-history.md" "2025-01-09"
"episodes/End.md" "42f2019c55b38db5ec0eab909b6bca4d" "site/built/End.md" "2025-01-09"
Expand Down

0 comments on commit ad5c38e

Please sign in to comment.