From 3f731b9257bb976f6cfc26e5ecf8e7c5a60f0dd9 Mon Sep 17 00:00:00 2001 From: Christian Krause <christian.krause@idiv.de> Date: Wed, 14 Sep 2022 09:34:35 +0200 Subject: [PATCH] s/master/main --- basics.html | 20 ++++++++++---------- img/git-remote-contributor.dot | 14 +++++++------- img/git-remote-maintainer.dot | 16 ++++++++-------- img/git-remote-solo.dot | 10 +++++----- img/motivation-throwaway-playground.dot | 14 +++++++------- 5 files changed, 37 insertions(+), 37 deletions(-) diff --git a/basics.html b/basics.html index 311c42a..578f09a 100644 --- a/basics.html +++ b/basics.html @@ -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 diff --git a/img/git-remote-contributor.dot b/img/git-remote-contributor.dot index e4fa755..ad79f6d 100644 --- a/img/git-remote-contributor.dot +++ b/img/git-remote-contributor.dot @@ -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] } diff --git a/img/git-remote-maintainer.dot b/img/git-remote-maintainer.dot index acd181d..3c5cc38 100644 --- a/img/git-remote-maintainer.dot +++ b/img/git-remote-maintainer.dot @@ -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] } diff --git a/img/git-remote-solo.dot b/img/git-remote-solo.dot index f221ad5..0b3b368 100644 --- a/img/git-remote-solo.dot +++ b/img/git-remote-solo.dot @@ -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"] } diff --git a/img/motivation-throwaway-playground.dot b/img/motivation-throwaway-playground.dot index 8fc4cdb..d6d1989 100644 --- a/img/motivation-throwaway-playground.dot +++ b/img/motivation-throwaway-playground.dot @@ -1,16 +1,16 @@ 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 } -- GitLab