-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add node diagrams of where different bits of data are. #21
base: main
Are you sure you want to change the base?
Conversation
We will follow up the building locally offline with others in the Git and GitHub champions group if needed. I wonder if instead of a flowchart diagram this should be a sequence diagram: sequenceDiagram
autonumber
box Purple GitHub Remote
participant GHM as origin main
participant GHF as origin feature
end
box Blue Local
participant M as main
participant F as feature
end
GHM ->> M: git pull
M ->> F: git switch -c feature
loop Develop Changes
F ->> F: git add <br/> git commit
end
F -->> GHF: git push
GHF -->> GHM: Pull Request and then Merge
GHM ->> M: git pull
|
That's the review process workflow - what I'm trying to illustrate is the distributed nature of git. I think the concept of a potentially completely independent clone and living it's own life (until you push, pull or fetch) is alien to some of the people we saw on Wednesday. What I'm really trying to communicate is that the branch structure is two generations deep - where svn has
git has
|
Yes @wxtim sorry I pasted that there to also add in as I thought it might be useful, Emma sent it to me. I will think about a diagram to represent this next week. |
First one found one a quick google - https://www.geeksforgeeks.org/centralized-vs-distributed-version-control-which-one-should-we-choose/ What I was aiming for with my diagram: https://medium.com/edureka/what-is-git-d7267d658069 |
Thanks @wxtim I can make versions of those for light and dark mode as svgs then add them in :) |
Bear in mind that only really covers the branch model, but it's a reasonable template for the folk model flowchart TD
upstream --> |fork/sync| origin
origin ==> |"PR (secure)"| upstream
local --> |push| origin
origin --> |switch/checkout| local
(What many people actually do) flowchart TD
upstream --> |switch/checkout| local
local --> |push| origin
origin ==> |"PR (secure)"| upstream
or for more context (adding numbers to indicate the order of steps) flowchart LR
subgraph GitHub
origin ==> |"❸PR (secure)"| upstream
end
upstream --> |"❶switch/checkout"| local
local --> |❷push| origin
subgraph "My Computer"
local
end
|
A complex model which might mention to people just to show how powerful this approach is: flowchart LR
subgraph GitHub
origin ==> |"❸PR (secure)"| upstream
end
upstream --> |"❶switch/checkout"| local2
local2 --> |❷push| origin
local --> |❷push| origin
upstream --> |"❶switch/checkout"| local
upstream --> |"git switch (daily backup)"| metomi
subgraph "My Computer"
local
end
subgraph pi ["my raspberry pi"]
local2
end
subgraph _metomi["Metomi team machine"]
metomi
end
|
This adds what I believe are helpful node diagrams of two of the forking models, and a less helpful diagram of the third (which is nonetheless illustrative).
See https://github.com/wxtim/git-working-practices/blob/node-diagrams_of_branch_modes/episodes/02-branching.md for the preview.
@astroDimitrios I've tried to build the docs locally, but the instructions seem to assume that I can
sudo apt install
. How do you preview changes when reviewing?