Skip to content
This repository was archived by the owner on Sep 1, 2022. It is now read-only.

Commit 118cd23

Browse files
authored
Merge pull request #134 from githubtraining/rename-branch
Rename main branch in responses
2 parents 016452f + db7d4be commit 118cd23

File tree

11 files changed

+29
-29
lines changed

11 files changed

+29
-29
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ For more information on the goals of this course, check out the [`course-details
1414

1515
## Contribute
1616

17-
See something we could improve? Check out the contributing guide in the [community contributors repository](https://github.com/githubtraining/community-contributors/blob/master/CONTRIBUTING.md) for more information on the types of contributions we :heart: and instructions.
17+
See something we could improve? Check out the contributing guide in the [community contributors repository](https://github.com/githubtraining/community-contributors/blob/main/CONTRIBUTING.md) for more information on the types of contributions we :heart: and instructions.
1818

19-
We :heart: our community and take great care to ensure it is fun, safe and rewarding. Please review our [Code of Conduct](https://github.com/githubtraining/community-contributors/blob/master/CODE_OF_CONDUCT.md) for community expectations and guidelines for reporting concerns.
19+
We :heart: our community and take great care to ensure it is fun, safe and rewarding. Please review our [Code of Conduct](https://github.com/githubtraining/community-contributors/blob/main/CODE_OF_CONDUCT.md) for community expectations and guidelines for reporting concerns.
2020

2121
## License
2222

config.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ before:
1919
releases: "%payload.repository.html_url%/releases"
2020

2121
steps:
22-
#1 - ask the user to create a beta release from the most recent commit on master
22+
#1 - ask the user to create a beta release from the most recent commit on main
2323
- title: Create a beta release
2424
description: Create a beta release, or a pre-release, from the existing codebase.
2525
event: release.published
@@ -125,13 +125,13 @@ steps:
125125
# We comment and let them know that they should merge
126126
- type: respond
127127
with: 05.1_early-close.md
128-
# If the user does everything right, we create the next issue with instructions to create a pull request from the release branch into master
128+
# If the user does everything right, we create the next issue with instructions to create a pull request from the release branch into main
129129
- type: createIssue
130130
title: Create a release pull request
131131
body: 05.2_release-pr.md
132132
action_id: releaseIssue
133133
data:
134-
prUrl: "%payload.repository.html_url%/compare/master...release-v1.0?expand=1"
134+
prUrl: "%payload.repository.html_url%/compare/main...release-v1.0?expand=1"
135135
# We comment in the merged pull request, and point them to the new issue with instructions
136136
- type: respond
137137
with: 05.3_response.md
@@ -141,9 +141,9 @@ steps:
141141
- type: closeIssue
142142
issue: Adding a feature
143143

144-
#6 - The user opens a pull request from the release branch into master
144+
#6 - The user opens a pull request from the release branch into main
145145
- title: Open a release pull request
146-
description: Create a pull request to bring the new feature into master.
146+
description: Create a pull request to bring the new feature into main.
147147
event: pull_request
148148
link: "{{ repoUrl }}/issues/5"
149149
actions:
@@ -160,7 +160,7 @@ steps:
160160
gates:
161161
- left: "%payload.pull_request.base.ref%"
162162
operator: ===
163-
right: master
163+
right: main
164164
- left: "%payload.pull_request.head.ref%"
165165
operator: ===
166166
right: release-v1.0
@@ -280,9 +280,9 @@ steps:
280280
event: APPROVE
281281
pullRequest: Release v1.0
282282

283-
#10 - The user approves the branch merge into master
283+
#10 - The user approves the branch merge into main
284284
- title: Merge the release branch
285-
description: Merge the release branch into master.
285+
description: Merge the release branch into main.
286286
event: pull_request.closed
287287
link: "{{ repoUrl }}/pull/6"
288288
actions:
@@ -325,7 +325,7 @@ steps:
325325
title: Accidental bugs
326326
body: 11.1_hotfix-intro.md
327327
head: bug-fix
328-
base: master
328+
base: main
329329
action_id: newPullRequest
330330
- type: assignRegistrant
331331
issue: "%actions.newPullRequest.data.number%"
@@ -345,7 +345,7 @@ steps:
345345
- type: closeIssue
346346
issue: Finalize the release
347347

348-
#12 - User resolves the bug, then approves the pull request and it is merged into master
348+
#12 - User resolves the bug, then approves the pull request and it is merged into main
349349
- title: Approve a hotfix pull request
350350
description: Submit a hotfix to a previous release.
351351
event: pull_request_review.submitted

responses/00.1_welcome.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# Welcome
22

3-
This repository will teach you about release workflows. By the end of this course, you'll have two versions of the classic arcade game, "Alien Invasion". Let's get started! If you'd like, you can use [GitHub Pages](https://pages.github.com/) to host your Invasion game and see live updates. Go to the **Settings** tab of this repository. Scroll down to **GitHub Pages**. Select `master` as a **Source**.
3+
This repository will teach you about release workflows. By the end of this course, you'll have two versions of the classic arcade game, "Alien Invasion". Let's get started! If you'd like, you can use [GitHub Pages](https://pages.github.com/) to host your Invasion game and see live updates. Go to the **Settings** tab of this repository. Scroll down to **GitHub Pages**. Select `main` as a **Source**.
44

55
## The GitHub flow
66

77
![github-flow](https://user-images.githubusercontent.com/6351798/48032310-63842400-e114-11e8-8db0-06dc0504dcb5.png)
88

99
The [GitHub flow](https://guides.github.com/introduction/flow/) is a lightweight, branch-based workflow for projects with regular deployments.
1010

11-
Some projects may deploy more often, with continuous deployment. There might be a "release" every time there's a new commit on master.
11+
Some projects may deploy more often, with continuous deployment. There might be a "release" every time there's a new commit on main.
1212

1313
But, some projects rely on a different structure for versions and releases.
1414

@@ -31,7 +31,7 @@ Before using a release based workflow for a larger release, let's create a tag a
3131
1. Go to the [**Releases** page]({{ releases }}) for this repository.
3232
- You can click the link above, or click the **Code** tab at the top of your repository. Then, find the navigation bar below the repository description, and click **0 releases**.
3333
1. Click **Create a new release**.
34-
1. In the field for _Tag version_, specify a number. In this case, use **v0.9**. Keep the _Target_ as **master**.
34+
1. In the field for _Tag version_, specify a number. In this case, use **v0.9**. Keep the _Target_ as **main**.
3535
1. Give the release a title, like "First beta release". If you'd like, you could also give the release a short description.
3636
1. Select the checkbox next to **This is a pre-release**, since it is representing a beta version.
3737
1. Click **Publish release**.

responses/03.1_update-readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
As you prepare for a future release, you'll need to organize more than the tasks and features. It's important to create a clear workflow for your team, and to make sure that the work remains organized.
44

5-
There are several strategies for managing releases. Some teams might use long-lived branches, like `production`, `dev`, and `master`. Some teams use simple feature branches, releasing from the master branch.
5+
There are several strategies for managing releases. Some teams might use long-lived branches, like `production`, `dev`, and `main`. Some teams use simple feature branches, releasing from the main branch.
66

77
No one strategy is better than another. We always recommend being intentional about branches and reducing long-lived branches whenever possible.
88

99
In this exercise, you'll use the `release-v1.0` branch to be your one long-lived branch per release version.
1010

1111
## Protected branches
1212

13-
Like the `master` branch, you can protect release branches. This means you can protect branches from force pushes or accidental deletion. This is already configured in this repository.
13+
Like the `main` branch, you can protect release branches. This means you can protect branches from force pushes or accidental deletion. This is already configured in this repository.
1414

1515
## Add a feature
1616

responses/05.2_release-pr.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
## Release branches and `master`
1+
## Release branches and `main`
22

3-
You should open a pull request between your release branch and master as early as possible. It might be open for a long time, and that's okay. The pull request corresponds to the work in the project board.
3+
You should open a pull request between your release branch and main as early as possible. It might be open for a long time, and that's okay. The pull request corresponds to the work in the project board.
44

55
The pull request description should:
66
- Include a brief description of the pull request
@@ -11,11 +11,11 @@ To expedite the creation of this pull request, I've added a pull request templat
1111

1212
### Step 6: Open a release pull request
1313

14-
Let's make a new pull request comparing the `release` branch to the `master` branch.
14+
Let's make a new pull request comparing the `release` branch to the `main` branch.
1515

1616
### :keyboard: Activity: Open a pull request
1717

18-
1. Open a [new pull request]({{ prUrl }}) with `base: master` and `compare: release-v1.0`.
18+
1. Open a [new pull request]({{ prUrl }}) with `base: main` and `compare: release-v1.0`.
1919
1. Ensure the title of your pull request is **Release v1.0**
2020
1. Include a detailed pull request body.
2121

responses/06.1_wrong-base.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ Uh oh, the branches in this pull request aren't quite right.
22

33
### :keyboard: Activity: Fix the base
44

5-
I was expecting `base:` set to `master`, and `compare:` set to `release-v1.0`.
5+
I was expecting `base:` set to `main`, and `compare:` set to `release-v1.0`.
66

77
- To change just your base, see [Changing the base branch of a pull request](https://help.github.com/articles/changing-the-base-branch-of-a-pull-request/) for full instructions.
8-
- To change the `compare:` branch, close this pull request and open a new one with `base:` set to `master` and `compare:` set to `release-v1.0`.
8+
- To change the `compare:` branch, close this pull request and open a new one with `base:` set to `main` and `compare:` set to `release-v1.0`.
99

1010
<hr>
1111
<h3 align="center">I'll respond in this pull request when you've changed the base, or in your new pull request if you close this one out.</h3>

responses/09.2_response.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
## Step 10: Merge the release branch
22

3-
Because the master branch is protected, this pull request couldn't be merged until it received an approval. I've gone ahead and approved this one for you. It looks great!
3+
Because the main branch is protected, this pull request couldn't be merged until it received an approval. I've gone ahead and approved this one for you. It looks great!
44

55
It's generally a good idea to make sure that branches, especially long-lived ones like release branches, have the approval of your peers. Go ahead and merge before we move onto our next steps.
66

7-
### :keyboard: Activity: Merge into master
7+
### :keyboard: Activity: Merge into main
88

99
1. Click **Merge pull request**.
1010

responses/11.1_hotfix-intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ _Sometimes GitHub Pages takes a few minutes to update. Your page might not immed
88

99
When bugs come up after you release a version, you'll need to address them.
1010

11-
We've already created this branch, pull request, and suggested a fix. The suggested change will be merged into the master branch. Later we will `cherry-pick` the hotfix commits into the release branch.
11+
We've already created this branch, pull request, and suggested a fix. The suggested change will be merged into the main branch. Later we will `cherry-pick` the hotfix commits into the release branch.
1212

1313
## Step 12: Approve a hotfix pull request
1414

responses/12.1_backport.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
If you have previous release branches that are impacted by this bug, you might need to make a few retroactive pull requests. Generally, we do this by using [`git cherry-pick`](https://git-scm.com/docs/git-cherry-pick) to apply just those commits that should be backported.
44

5-
In our case, no new changes have been merged into master since we shipped our hotfix, so we can merge the entire branch as is.
5+
In our case, no new changes have been merged into main since we shipped our hotfix, so we can merge the entire branch as is.
66

77
### :keyboard: Activity: Backport the hotfix to release v1.0
88

responses/12.2_fix-merged.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Your fix is now on `master`! This ensures that any new code isn't based on our bug.
1+
Your fix is now on `main`! This ensures that any new code isn't based on our bug.
22

33
Let's backport those changes to the branch with release v1.0.
44

0 commit comments

Comments
 (0)