@@ -189,7 +189,7 @@ Post-Release procedures
189
189
list on the web site if you updated the ``docs/credits.rst `` at the outset.
190
190
191
191
#. Cherry-pick the commit rendering the changelog and deleting the fragments and
192
- open a PR to the astropy *master * branch. Note: updating this when doing the
192
+ open a PR to the astropy *main * branch. Note: updating this when doing the
193
193
next release with towncrier.
194
194
In the same PR, you also have to update ``docs/whatsnew/index.rst `` and
195
195
``docs/whatsnew/X.Y.rst `` to link to "what's new" documentation in the
@@ -265,21 +265,21 @@ Performing a Feature Freeze/Branching new Major Versions
265
265
========================================================
266
266
267
267
As outlined in
268
- `APE2 <https://github.com/astropy/astropy-APEs/blob/master /APE2.rst >`_, astropy
268
+ `APE2 <https://github.com/astropy/astropy-APEs/blob/main /APE2.rst >`_, astropy
269
269
releases occur at regular intervals, but feature freezes occur well before the
270
- actual release. Feature freezes are also the time when the master branch's
270
+ actual release. Feature freezes are also the time when the main branch's
271
271
development separates from the new major version's maintenance branch. This
272
272
allows new development for the next major version to continue while the
273
273
soon-to-be-released version can focus on bug fixes and documentation updates.
274
274
275
275
The procedure for this is straightforward:
276
276
277
- #. Update your local master branch to use to the latest version from github::
277
+ #. Update your local main branch to use to the latest version from github::
278
278
279
279
$ git fetch upstream --tags
280
- $ git checkout -B master upstream/master
280
+ $ git checkout -B main upstream/main
281
281
282
- #. Create a new branch from master at the point you want the feature freeze to
282
+ #. Create a new branch from main at the point you want the feature freeze to
283
283
occur::
284
284
285
285
$ git branch v<version>.x
@@ -312,7 +312,7 @@ The procedure for this is straightforward:
312
312
#. Push all of these changes up to github::
313
313
314
314
$ git push upstream v<version>.x:v<version>.x
315
- $ git push upstream master:master
315
+ $ git push upstream main:main
316
316
317
317
.. note::
318
318
@@ -343,17 +343,17 @@ that enhance clarity but do not describe new features (e.g., more examples,
343
343
typo fixes, etc).
344
344
345
345
Bug fix releases are typically managed by maintaining one or more bug fix
346
- branches separate from the master branch (the release procedure below discusses
346
+ branches separate from the main branch (the release procedure below discusses
347
347
creating these branches). Typically, whenever an issue is fixed on the Astropy
348
- master branch a decision must be made whether this is a fix that should be
348
+ main branch a decision must be made whether this is a fix that should be
349
349
included in the Astropy bug fix release. Usually the answer to this question
350
350
is "yes", though there are some issues that may not apply to the bug fix
351
351
branch. For example, it is not necessary to backport a fix to a new feature
352
352
that did not exist when the bug fix branch was first created. New features
353
353
are never merged into the bug fix branch--only bug fixes; hence the name.
354
354
355
355
In rare cases a bug fix may be made directly into the bug fix branch without
356
- going into the master branch first. This may occur if a fix is made to a
356
+ going into the main branch first. This may occur if a fix is made to a
357
357
feature that has been removed or rewritten in the development version and no
358
358
longer has the issue being fixed. However, depending on how critical the bug
359
359
is it may be worth including in a bug fix release, as some users can be slow to
@@ -366,31 +366,31 @@ For example, at the time of writing there are two release milestones open:
366
366
v1.2.2 and v0.3.0. In this case, v1.2.2 is the next bug fix release and all
367
367
issues that should include fixes in that release should be assigned that
368
368
milestone. Any issues that implement new features would go into the v0.3.0
369
- milestone--this is any work that goes in the master branch that should not
369
+ milestone--this is any work that goes in the main branch that should not
370
370
be backported. For a more detailed set of guidelines on using milestones, see
371
371
:ref: `milestones-and-labels `.
372
372
373
373
374
374
.. _release-procedure-bug-fix-backport :
375
375
376
- Backporting fixes from master
377
- -----------------------------
376
+ Backporting fixes from main
377
+ ---------------------------
378
378
379
379
.. note ::
380
380
381
381
The changelog script in ``astropy-procedures `` (``pr_consistency `` scripts
382
382
in particular) does not know about minor releases, thus please be careful.
383
- For example, let's say we have two branches (``master `` and ``v1.2.x ``).
383
+ For example, let's say we have two branches (``main `` and ``v1.2.x ``).
384
384
Both 1.2.0 and 1.2.1 releases will come out of the same v1.2.x branch.
385
- If a PR for 1.2.1 is merged into ``master `` before 1.2.0 is released,
385
+ If a PR for 1.2.1 is merged into ``main `` before 1.2.0 is released,
386
386
it should not be backported into v1.2.x branch until after 1.2.0 is
387
387
released, despite complaining from the aforementioned script.
388
388
This situation only arises in a very narrow time frame after 1.2.0
389
389
freeze but before its release.
390
390
391
391
Most fixes are backported using the ``git cherry-pick `` command, which applies
392
392
the diff from a single commit like a patch. For the sake of example, say the
393
- current bug fix branch is 'v1.2.x', and that a bug was fixed in master in a
393
+ current bug fix branch is 'v1.2.x', and that a bug was fixed in main in a
394
394
commit ``abcd1234 ``. In order to backport the fix, checkout the v1.2.x
395
395
branch (it's also good to make sure it's in sync with the
396
396
`astropy core repository `_) and cherry-pick the appropriate commit::
@@ -408,8 +408,8 @@ sure to backport that as well.
408
408
409
409
What if the issue required more than one commit to fix? There are a few
410
410
possibilities for this. The easiest is if the fix came in the form of a
411
- pull request that was merged into the master branch. Whenever GitHub merges
412
- a pull request it generates a merge commit in the master branch. This merge
411
+ pull request that was merged into the main branch. Whenever GitHub merges
412
+ a pull request it generates a merge commit in the main branch. This merge
413
413
commit represents the *full * difference of all the commits in the pull request
414
414
combined. What this means is that it is only necessary to cherry-pick the
415
415
merge commit (this requires adding the ``-m 1 `` option to the cherry-pick
@@ -457,11 +457,11 @@ there are two choices:
457
457
check out the bug fix branch and commit and push your fix directly.
458
458
459
459
2. **Preferable **: You may also make a pull request through GitHub against the
460
- bug fix branch rather than against master . Normally when making a pull
460
+ bug fix branch rather than against main . Normally when making a pull
461
461
request from a branch on your fork to the `astropy core repository `_, GitHub
462
- compares your branch to Astropy's master . If you look on the left-hand
462
+ compares your branch to Astropy's main . If you look on the left-hand
463
463
side of the pull request page, under "base repo: astropy/astropy" there is
464
- a drop-down list labeled "base branch: master ". You can click on this
464
+ a drop-down list labeled "base branch: main ". You can click on this
465
465
drop-down and instead select the bug fix branch ("v1.2.x" for example). Then
466
466
GitHub will instead compare your fix against that branch, and merge into
467
467
that branch when the PR is accepted.
@@ -483,7 +483,7 @@ right version number).
483
483
484
484
2. The Astropy changelog must be updated to list all issues--especially
485
485
user-visible issues--fixed for the current release. The changelog should
486
- be updated in the master branch, and then merged into the bug fix branch.
486
+ be updated in the main branch, and then merged into the bug fix branch.
487
487
Most issues *should * already have changelog entries for them. But
488
488
occasionally these are forgotten, so if doesn't exist yet please add one in
489
489
the process of backporting. See :ref: `changelog-format ` for more details.
@@ -504,7 +504,7 @@ The script to actually check consistency should be run like::
504
504
$ python 4.check_consistency.py > consistency.html
505
505
506
506
Which will generate a simple web page that shows all of the areas where either
507
- a pull request was merged into master but is *not * in the relevant release that
507
+ a pull request was merged into main but is *not * in the relevant release that
508
508
it has been milestoned for, as well as any changelog irregularities (i.e., PRs
509
509
that are in the wrong section for what the github milestone indicates). You'll
510
510
want to correct those irregularities *first * before starting the backport
0 commit comments