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

s/master/main

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