@@ -278,6 +278,60 @@ on your local `main` branch.
278278
279279:::
280280
281+ ## Summary Diagram
282+
283+ The workflow for forking is similar to that for branching.
284+ There are only a few differences after you've set up your fork
285+ for the first time:
286+
287+ - You should open Issues on the upstream repository not your fork.
288+ - After merging in a PR on the upstream repository you need the
289+ added step of syncing your forks ` main ` branch.
290+
291+ ``` mermaid
292+ sequenceDiagram
293+ accDescr {A sequence diagram showing the steps for using
294+ Forks with the branching model.}
295+ autonumber
296+ participant UM as upstream main
297+ participant GHM as origin main
298+ participant GHF as origin feature
299+ participant M as main
300+ UM ->> UM: #f
301+ Note over UM: Open an Issue for the change
302+ UM -->> GHM: #f
303+ Note right of UM: First time: Fork the repository
304+ GHM -->> M: #f
305+ Note right of GHM: First time: git clone<br/>Then: git pull
306+ create participant F as feature
307+ M ->> F: Create a feature branch:<br/>git switch -c feature
308+ loop
309+ F ->> F: #f
310+ Note over F: Develop changes:<br/>git add<br/>git commit
311+ end
312+ F -->> GHF: #f
313+ Note left of F: Push to GitHub: git push<br/>The first push creates origin feature!
314+ destroy GHF
315+ GHF -->> UM: #f
316+ Note left of GHF: Pull Request and then Merge.<br/>Delete origin feature branch.
317+ UM -->> GHM: #f
318+ Note right of UM: Sync your fork
319+ GHM -->> M: #f
320+ Note right of GHM: git pull
321+ Note over F: Delete branch:<br/>git branch -d feature
322+ box Upstream Remote - GitHub
323+ participant UM
324+ end
325+ box Fork Remote - GitHub
326+ participant GHM
327+ participant GHF
328+ end
329+ box Fork - Local
330+ participant M
331+ participant F
332+ end
333+ ```
334+
281335:::::::::::::::::::::::::::::::::::::::: keypoints
282336
283337- A fork is a server side, in our case GitHub, copy
0 commit comments