Skip to content

Commit 08b6d28

Browse files
authored
chore: docs changing "master" to "main" (#538)
* chore: changing "master" to "main" for non-Jenkins portion of instructions. Issue 486 * chore: removed trailing whitespace * chore: reverting change so it can be fixed with code change
1 parent b67e62a commit 08b6d28

File tree

6 files changed

+32
-4
lines changed

6 files changed

+32
-4
lines changed

1-org/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,10 @@ Run `terraform output cloudbuild_project_id` in the `0-bootstrap` folder to see
131131
1. Clone the repo.
132132
```
133133
gcloud source repos clone gcp-org --project=YOUR_CLOUD_BUILD_PROJECT_ID
134+
134135
```
136+
The message `warning: You appear to have cloned an empty repository.` is
137+
normal and can be ignored.
135138
1. Navigate into the repo and change to a non-production branch. All subsequent
136139
steps assume you are running them from the gcp-environments directory. If
137140
you run them from another directory, adjust your copy paths accordingly.

2-environments/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ commands. The `-T` flag is needed for Linux, but causes problems for MacOS.
7373
```
7474
gcloud source repos clone gcp-environments --project=YOUR_CLOUD_BUILD_PROJECT_ID
7575
```
76-
1. Navigate into the repo and change to the non-master branch. All subsequent
76+
1. Navigate into the repo and change to the non-main branch. All subsequent
7777
steps assume you are running them from the gcp-environments directory. If
7878
you run them from another directory, adjust your copy paths accordingly.
7979

3-networks/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ If you are not able to use Dedicated or Partner Interconnect, you can also use a
120120
```
121121
gcloud source repos clone gcp-networks --project=YOUR_CLOUD_BUILD_PROJECT_ID
122122
```
123-
1. Change to the freshly cloned repo and change to non-master branch.
123+
1. Change to the freshly cloned repo and change to non-main branch.
124124
```
125125
git checkout -b plan
126126
```

4-projects/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ commands. The `-T` flag is needed for Linux, but causes problems for MacOS.
117117
```
118118
gcloud source repos clone gcp-projects --project=YOUR_CLOUD_BUILD_PROJECT_ID
119119
```
120-
1. Change freshly cloned repo and change to non-master branch.
120+
1. Change freshly cloned repo and change to non-main branch.
121121
```
122122
git checkout -b plan
123123
```

5-app-infra/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ commands. The `-T` flag is needed for Linux, but causes problems for MacOS.
120120
```
121121
cd bu1-example-app
122122
```
123-
1. Change freshly cloned repo and change to non-master branch.
123+
1. Change freshly cloned repo and change to non-main branch.
124124
```
125125
git checkout -b plan
126126
```

docs/TROUBLESHOOTING.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ See [GLOSSARY.md](./GLOSSARY.md).
1717
## Common issues
1818

1919
- [Project quota exceeded](#project-quota-exceeded)
20+
- [Default branch setting](#default-branch-setting)
2021
- [Terraform State Snapshot lock](#terraform-state-snapshot-lock)
2122
- [Application authenticated using end user credentials](#application-authenticated-using-end-user-credentials)
2223
- [Cannot assign requested address error in Cloud Shell](#cannot-assign-requested-address-error-in-cloud-shell)
@@ -46,6 +47,30 @@ use the email address of `terraform_service_account` that is created by the Terr
4647

4748
- If you see other quota errors, see the [Quota documentation](https://cloud.google.com/docs/quota).
4849

50+
### Default branch setting
51+
52+
**Error message:**
53+
54+
```
55+
error: src refspec master does not match any
56+
```
57+
**Cause:**
58+
59+
This could be due to init.defaultBranch being set to something other than
60+
`main`.
61+
62+
**Solution:**
63+
64+
1. Determine your default branch:
65+
```
66+
git config init.defaultBranch
67+
```
68+
Outputs `main` if you are in the main branch.
69+
1. If your default branch is not set to `main`, set it:
70+
```
71+
git config --global init.defaultBranch main
72+
```
73+
4974
### Terraform State Snapshot lock
5075

5176
**Error message:**

0 commit comments

Comments
 (0)