@@ -80,7 +80,7 @@ perltidy -l=99 -conv -ci=4 -ola -ce -nbbc -kis -pt=2 -b ddclient
80
80
81
81
## Git Hygiene
82
82
83
- * Please keep your pull request commits rebased on top of master .
83
+ * Please keep your pull request commits rebased on top of ` main ` .
84
84
* Please use ` git rebase -i ` to make your commits easy to review:
85
85
- Put unrelated changes in separate commits
86
86
- Squash your fixup commits
@@ -190,11 +190,11 @@ better to revert the original change then redo it:
190
190
191
191
# ## Merging Pull Requests
192
192
193
- To facilitate reviews and code archaeology, ` master ` should have a
193
+ To facilitate reviews and code archaeology, ` main ` should have a
194
194
semi-linear commit history like this:
195
195
196
196
```
197
- * f4e6e90
[email protected] 2020-05-31 07:29:51 +0200 (
master )
197
+ * f4e6e90
[email protected] 2020-05-31 07:29:51 +0200 (
main )
198
198
|\ Merge pull request #142 from rhansen/config-line-format
199
199
| * 30180ed
[email protected] 2020-05-30 13:09:38 -0400
200
200
|/ Expand comment documenting config line format
@@ -231,7 +231,7 @@ has value:
231
231
change was made) and the merge timestamp (when it went live).
232
232
233
233
To achieve a history like the above, the pull request must be rebased
234
- onto `master ` before merging. Unfortunately, GitHub does not have a
234
+ onto `main ` before merging. Unfortunately, GitHub does not have a
235
235
one-click way to do this (the "Rebase and merge" option does a
236
236
fast-forward merge, which is not what we want). See
237
237
[isaacs/github#1143](https://github.com/isaacs/github/issues/1143) and
@@ -254,15 +254,15 @@ git remote set-url origin
[email protected] :ddclient/ddclient.git
254
254
# Add a remote for the fork used in the PR
255
255
git remote add "${PR_USER:?}" [email protected] :"${PR_USER:?}"/ddclient
256
256
257
- # Fetch the latest commits for the PR and ddclient master
257
+ # Fetch the latest commits for the PR and ddclient main
258
258
git remote update -p
259
259
260
260
# Switch to the pull request branch
261
261
git checkout -b "${PR_USER:?}-${PR_BRANCH:?}" "${PR_USER:?}/${PR_BRANCH:?}"
262
262
263
263
# Rebase the commits (optionally using -i to clean up history) onto
264
- # the current ddclient master branch
265
- git rebase origin/master
264
+ # the current ddclient main branch
265
+ git rebase origin/main
266
266
267
267
# Force update the contributor's fork. This will only work if the
268
268
# contributor has checked the "Allow edits by maintainers" box in the
@@ -276,19 +276,19 @@ git push -f
276
276
# "Allow edits by maintainers", or if you prefer to merge manually,
277
277
# continue with the next steps.
278
278
279
- # Switch to the local master branch
280
- git checkout master
279
+ # Switch to the local main branch
280
+ git checkout main
281
281
282
- # Make sure the local master branch is up to date
283
- git merge --ff-only origin/master
282
+ # Make sure the local main branch is up to date
283
+ git merge --ff-only origin/main
284
284
285
285
# Merge in the rebased pull request branch **WITHOUT DOING A
286
286
# FAST-FORWARD MERGE**
287
287
git merge --no-ff "${PR_USER:?}-${PR_BRANCH:?}"
288
288
289
289
# Review the commits before pushing
290
- git log --graph --oneline --decorate origin/master ..
290
+ git log --graph --oneline --decorate origin/main ..
291
291
292
- # Push to ddclient master
293
- git push origin master
292
+ # Push to ddclient main
293
+ git push origin main
294
294
```
0 commit comments