Skip to content
Snippets Groups Projects
Unverified Commit 3f731b92 authored by ck85nori's avatar ck85nori :railway_track:
Browse files

s/master/main

parent 6461ef8d
No related branches found
No related tags found
No related merge requests found
......@@ -820,7 +820,7 @@
notes:
- this is a demo chapter, you will all do this in collaboration
chapter (next one)
- what was this **master** again? we have not explained yet
- what was this **main** again? we have not explained yet
</section>
<section id="branch-visual" data-markdown>
......@@ -833,7 +833,7 @@
- create a branch to have a separate history
- branch is a name attached to a commit
- the name advances when a new commit is made
- **master** is a naming convention for the default branch
- **main** is a naming convention for the default branch
- switch back and forth
- always imagine git history as a directed graph
- graph is drawn with new top and old bottom
......@@ -844,7 +844,7 @@
<section id="branch-when-to-use" data-markdown>
## when to use branches
- breaking **master**
- breaking **main**
- something takes longer
- frequent interruptions
- (instead of) comment out code
......@@ -908,7 +908,7 @@
```bash
# resolve branch by merging
git switch master
git switch main
git merge branch-name
# delete branch
......@@ -917,7 +917,7 @@
notes:
```
# switch master, lol
# switch main, lol
# merge wip/feature, lol
# branch -d wip/feature, lol
```
......@@ -946,7 +946,7 @@
notes:
- we: new commit
- group: fetch, lol, pull upstream master, lol
- group: fetch, lol, pull upstream main, lol
- group: push origin, lol
- group: branch, switch, commit, push, MR
- collaboration happens in issues and MR discussion!
......@@ -979,7 +979,7 @@
```bash
git fetch upstream
git switch topic/feature
git merge origin/master
git merge origin/main
# fix conflicts
git push
```
......@@ -1086,7 +1086,7 @@
```bash
git remote add alice https://...
git fetch alice
git rebase [--interactive] master alice/topic/feature
git rebase [--interactive] main alice/topic/feature
# fix conflicts
git push
# manually close merge request
......@@ -1102,7 +1102,7 @@
```bash
git fetch upstream
git rebase origin/master topic/feature
git rebase origin/main topic/feature
# fix conflicts
# force push because branch history changed
git push --force
......@@ -1136,7 +1136,7 @@
```bash
git remote add alice https://...
git fetch alice
git switch master
git switch main
git merge alice/topic/feature
# fix conflicts
git push
......
......@@ -6,7 +6,7 @@ digraph {
node [color = orchid]
omaster[label = "master"]
omain[label = "main"]
}
subgraph clusterlocal {
......@@ -14,7 +14,7 @@ digraph {
node [color = orchid]
master[label = "master"]
main[label = "main"]
}
subgraph clusterupstream {
......@@ -22,11 +22,11 @@ digraph {
node [color = limegreen]
umaster[label = "master"]
umain[label = "main"]
}
omaster -> master [label = "git pull"]
master -> omaster [label = "git push", constraint = false]
umaster -> master [label = "git pull upstream master", constraint = false]
omaster -> umaster [label = "pull request (GitHub)\nmerge request (GitLab)", constraint = false]
omain -> main [label = "git pull"]
main -> omain [label = "git push", constraint = false]
umain -> main [label = "git pull upstream main", constraint = false]
omain -> umain [label = "pull request (GitHub)\nmerge request (GitLab)", constraint = false]
}
......@@ -6,7 +6,7 @@ digraph {
node [color = orchid]
omaster[label = "master"]
omain[label = "main"]
}
subgraph clusterlocal {
......@@ -14,7 +14,7 @@ digraph {
node [color = orchid]
master[label = "master"]
main[label = "main"]
}
subgraph clusteralice {
......@@ -22,7 +22,7 @@ digraph {
node [color = limegreen]
amaster[label = "master"]
amain[label = "main"]
}
subgraph clusterbob {
......@@ -30,11 +30,11 @@ digraph {
node [color = lightskyblue]
bmaster[label = "master"]
bmain[label = "main"]
}
omaster -> master [label = "git pull"]
master -> omaster [label = "git push", constraint = false]
amaster -> master [label = "git pull alice", constraint = false]
bmaster -> master [label = "git pull bob", constraint = false]
omain -> main [label = "git pull"]
main -> omain [label = "git push", constraint = false]
amain -> main [label = "git pull alice", constraint = false]
bmain -> main [label = "git pull bob", constraint = false]
}
......@@ -9,7 +9,7 @@ digraph {
node [color = orchid]
omaster[label = "master"]
omain[label = "main"]
}
subgraph clusterlocal {
......@@ -17,10 +17,10 @@ digraph {
node [color = orchid]
master[label = "master"]
main[label = "main"]
}
omaster -> master [label = "git fetch", style = dotted, ltail = clusterorigin, lhead = clusterlocal]
master -> omaster [label = "git push"]
omaster -> master [label = "git pull"]
omain -> main [label = "git fetch", style = dotted, ltail = clusterorigin, lhead = clusterlocal]
main -> omain [label = "git push"]
omain -> main [label = "git pull"]
}
digraph {
node [shape = "box", style = "filled, rounded"]
subgraph clustermaster {
label = "master"
subgraph clustermain {
label = "main"
node [color = limegreen]
master3[label = "..."]
master2[label = "..."]
master1[label = "..."]
main3[label = "..."]
main2[label = "..."]
main1[label = "..."]
master3 -> master2 -> master1
main3 -> main2 -> main1
}
subgraph clusterplayground {
......@@ -24,5 +24,5 @@ digraph {
playground2 -> playground1
}
playground1 -> master2
playground1 -> main2
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment