Skip to content

Commit 84512bd

Browse files
committed
MNT: rename master -> main in docs and CI
1 parent a1eef38 commit 84512bd

22 files changed

+74
-74
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ commands:
3131
git remote add upstream git://github.com/matplotlib/matplotlib.git
3232
fi
3333
git fetch upstream
34-
if [[ "$CIRCLE_BRANCH" != "master" ]] && \
34+
if [[ "$CIRCLE_BRANCH" != "main" ]] && \
3535
[[ "$CIRCLE_PR_NUMBER" != "" ]]; then
3636
echo "Merging ${CIRCLE_PR_NUMBER}"
3737
git pull --ff-only upstream "refs/pull/${CIRCLE_PR_NUMBER}/merge"
@@ -126,7 +126,7 @@ commands:
126126
export SOURCE_DATE_EPOCH="$(git log -1 --format=%at $(git describe --abbrev=0))"
127127
# Set release mode only when deploying to devdocs.
128128
if [ "$CIRCLE_PROJECT_USERNAME" = "matplotlib" ] && \
129-
[ "$CIRCLE_BRANCH" = "master" ] && \
129+
[ "$CIRCLE_BRANCH" = "main" ] && \
130130
[ "$CIRCLE_PR_NUMBER" = "" ]; then
131131
export RELEASE_TAG='-t release'
132132
fi

.circleci/deploy-docs.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
set -e
44

55
if [ "$CIRCLE_PROJECT_USERNAME" != "matplotlib" ] || \
6-
[ "$CIRCLE_BRANCH" != "master" ] || \
6+
[ "$CIRCLE_BRANCH" != "main" ] || \
77
[[ "$CIRCLE_PULL_REQUEST" == https://github.com/matplotlib/matplotlib/pull/* ]]; then
88
echo "Not uploading docs for ${CIRCLE_SHA1}"\
9-
"from non-master branch (${CIRCLE_BRANCH})"\
9+
"from non-main branch (${CIRCLE_BRANCH})"\
1010
"or pull request (${CIRCLE_PULL_REQUEST})"\
1111
"or non-Matplotlib org (${CIRCLE_PROJECT_USERNAME})."
1212
exit

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ consider the following points:
2121
- Help with git and github is available at
2222
https://matplotlib.org/devel/gitwash/development_workflow.html.
2323
24-
- Do not create the PR out of master, but out of a separate branch.
24+
- Do not create the PR out of main, but out of a separate branch.
2525
2626
- The PR title should summarize the changes, for example "Raise ValueError on
2727
non-numeric input to set_xlim". Avoid non-descriptive titles such as

.github/workflows/cibuildwheel.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Build CI wheels
33
on:
44
push:
55
branches:
6-
- master
6+
- main
77
- v[0-9]+.[0-9]+.x
88
tags:
99
- v*

.github/workflows/pr_welcome.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ jobs:
3232
3333
We strive to be a welcoming and open project. Please follow our
3434
[Code of
35-
Conduct](https://github.com/matplotlib/matplotlib/blob/master/CODE_OF_CONDUCT.md).
35+
Conduct](https://github.com/matplotlib/matplotlib/blob/main/CODE_OF_CONDUCT.md).

README.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
.. |GitHubActions| image:: https://github.com/matplotlib/matplotlib/workflows/Tests/badge.svg
88
.. _GitHubActions: https://github.com/matplotlib/matplotlib/actions?query=workflow%3ATests
99

10-
.. |AzurePipelines| image:: https://dev.azure.com/matplotlib/matplotlib/_apis/build/status/matplotlib.matplotlib?branchName=master
11-
.. _AzurePipelines: https://dev.azure.com/matplotlib/matplotlib/_build/latest?definitionId=1&branchName=master
10+
.. |AzurePipelines| image:: https://dev.azure.com/matplotlib/matplotlib/_apis/build/status/matplotlib.matplotlib?branchName=main
11+
.. _AzurePipelines: https://dev.azure.com/matplotlib/matplotlib/_build/latest?definitionId=1&branchName=main
1212

13-
.. |AppVeyor| image:: https://ci.appveyor.com/api/projects/status/github/matplotlib/matplotlib?branch=master&svg=true
13+
.. |AppVeyor| image:: https://ci.appveyor.com/api/projects/status/github/matplotlib/matplotlib?branch=main&svg=true
1414
.. _AppVeyor: https://ci.appveyor.com/project/matplotlib/matplotlib
1515

16-
.. |Codecov| image:: https://codecov.io/github/matplotlib/matplotlib/badge.svg?branch=master&service=github
17-
.. _Codecov: https://codecov.io/github/matplotlib/matplotlib?branch=master
16+
.. |Codecov| image:: https://codecov.io/github/matplotlib/matplotlib/badge.svg?branch=main&service=github
17+
.. _Codecov: https://codecov.io/github/matplotlib/matplotlib?branch=main
1818

1919
.. |LGTM| image:: https://img.shields.io/lgtm/grade/python/github/matplotlib/matplotlib.svg?logo=lgtm&logoWidth=18
2020
.. _LGTM: https://lgtm.com/projects/g/matplotlib/matplotlib

doc/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ def linkcode_resolve(domain, info):
634634
return None
635635

636636
version = parse(matplotlib.__version__)
637-
tag = 'master' if version.is_devrelease else f'v{version.public}'
637+
tag = 'main' if version.is_devrelease else f'v{version.public}'
638638
return ("https://github.com/matplotlib/matplotlib/blob"
639639
f"/{tag}/lib/{fn}{linespec}")
640640
else:

doc/devel/MEP/MEP19.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ great!]:
6767

6868
**Documentation**
6969

70-
Documentation of master is now built by travis and uploaded to https://matplotlib.org/devdocs/index.html
70+
Documentation of main is now built by travis and uploaded to https://matplotlib.org/devdocs/index.html
7171

7272
@NelleV, I believe, generates the docs automatically and posts them on
7373
the web to chart MEP10 progress.

doc/devel/MEP/template.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ MEPs go through a number of phases in their lifetime:
2424

2525
- **Progress**: Consensus was reached and implementation work has begun.
2626

27-
- **Completed**: The implementation has been merged into master.
27+
- **Completed**: The implementation has been merged into main.
2828

2929
- **Superseded**: This MEP has been abandoned in favor of another
3030
approach.

doc/devel/coding_guide.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ When making a PR, pay attention to:
3434

3535
.. rst-class:: checklist
3636

37-
* :ref:`Target the master branch <pr-branch-selection>`.
37+
* :ref:`Target the main branch <pr-branch-selection>`.
3838
* Adhere to the :ref:`coding_guidelines`.
3939
* Update the :ref:`documentation <pr-documentation>` if necessary.
4040
* Aim at making the PR as "ready-to-go" as you can. This helps to speed up
@@ -78,7 +78,7 @@ Organizational topics:
7878
.. rst-class:: checklist
7979

8080
* Make sure all :ref:`automated tests <pr-automated-tests>` pass.
81-
* The PR should :ref:`target the master branch <pr-branch-selection>`.
81+
* The PR should :ref:`target the main branch <pr-branch-selection>`.
8282
* Tag with descriptive :ref:`labels <pr-labels>`.
8383
* Set the :ref:`milestone <pr-milestones>`.
8484
* Keep an eye on the :ref:`number of commits <pr-squashing>`.
@@ -145,7 +145,7 @@ Milestones
145145
Setting a milestone does not imply or guarantee that a PR will be merged for that
146146
release, but if it were to be merged what release it would be in.
147147

148-
All of these PRs should target the master branch. The milestone tag triggers
148+
All of these PRs should target the main branch. The milestone tag triggers
149149
an :ref:`automatic backport <automated-backports>` for milestones which have
150150
a corresponding branch.
151151

@@ -267,7 +267,7 @@ Current branches
267267
----------------
268268
The current active branches are
269269

270-
*master*
270+
*main*
271271
The current development version. Future minor releases (*v3.N.0*) will be
272272
branched from this. Supports Python 3.7+.
273273

@@ -285,7 +285,7 @@ The current active branches are
285285
Branch selection for pull requests
286286
----------------------------------
287287

288-
Generally, all pull requests should target the master branch.
288+
Generally, all pull requests should target the main branch.
289289

290290
Other branches are fed through :ref:`automatic <automated-backports>` or
291291
:ref:`manual <manual-backports>`. Directly
@@ -344,7 +344,7 @@ When doing backports please copy the form used by meeseekdev,
344344
conflicts make note of them and how you resolved them in the commit
345345
message.
346346

347-
We do a backport from master to v2.2.x assuming:
347+
We do a backport from main to v2.2.x assuming:
348348

349349
* ``matplotlib`` is a read-only remote branch of the matplotlib/matplotlib repo
350350

@@ -376,4 +376,4 @@ and then continue the cherry pick:
376376
git cherry-pick --continue
377377
378378
Use your discretion to push directly to upstream or to open a PR; be
379-
sure to push or PR against the ``v2.2.x`` upstream branch, not ``master``!
379+
sure to push or PR against the ``v2.2.x`` upstream branch, not ``main``!

doc/devel/contributing.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Contributing
77
This project is a community effort, and everyone is welcome to
88
contribute. Everyone within the community
99
is expected to abide by our
10-
`code of conduct <https://github.com/matplotlib/matplotlib/blob/master/CODE_OF_CONDUCT.md>`_.
10+
`code of conduct <https://github.com/matplotlib/matplotlib/blob/main/CODE_OF_CONDUCT.md>`_.
1111

1212
The project is hosted on
1313
https://github.com/matplotlib/matplotlib
@@ -133,9 +133,9 @@ A brief overview is:
133133

134134
5. Create a branch to hold your changes::
135135

136-
git checkout -b my-feature origin/master
136+
git checkout -b my-feature origin/main
137137

138-
and start making changes. Never work in the ``master`` branch!
138+
and start making changes. Never work in the ``main`` branch!
139139

140140
6. Work on this copy, on your computer, using Git to do the version control.
141141
When you're done editing e.g., ``lib/matplotlib/collections.py``, do::

doc/devel/gitwash/development_workflow.rst

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,18 @@ git by following :ref:`configure-git`. Now you are ready for some real work.
1313
Workflow summary
1414
================
1515

16-
In what follows we'll refer to the upstream Matplotlib ``master`` branch, as
16+
In what follows we'll refer to the upstream Matplotlib ``main`` branch, as
1717
"trunk".
1818

19-
* Don't use your ``master`` branch for anything. Consider deleting it.
19+
* Don't use your ``main`` branch for anything. Consider deleting it.
2020
* When you are starting a new set of changes, fetch any changes from trunk,
2121
and start a new *feature branch* from that.
2222
* Make a new branch for each separable set of changes |emdash| "one task, one
2323
branch" (`ipython git workflow`_).
2424
* Name your branch for the purpose of the changes - e.g.
2525
``bugfix-for-issue-14`` or ``refactor-database-code``.
2626
* If you can possibly avoid it, avoid merging trunk or any other branches into
27-
your feature branch while you are working.
27+
your feature branch while you are working.
2828
* If you do find yourself merging from trunk, consider :ref:`rebase-on-trunk`
2929
* Ask on the `Matplotlib mailing list`_ if you get stuck.
3030
* Ask for code review!
@@ -35,11 +35,11 @@ what you've done, and why you did it.
3535

3636
See `linux git workflow`_ and `ipython git workflow`_ for some explanation.
3737

38-
Consider deleting your master branch
39-
====================================
38+
Consider deleting your main branch
39+
==================================
4040

41-
It may sound strange, but deleting your own ``master`` branch can help reduce
42-
confusion about which branch you are on. See `deleting master on github`_ for
41+
It may sound strange, but deleting your own ``main`` branch can help reduce
42+
confusion about which branch you are on. See `deleting main on github`_ for
4343
details.
4444

4545
.. _update-mirror-trunk:
@@ -55,8 +55,8 @@ From time to time you should fetch the upstream (trunk) changes from github::
5555

5656
This will pull down any commits you don't have, and set the remote branches to
5757
point to the right commit. For example, 'trunk' is the branch referred to by
58-
(remote/branchname) ``upstream/master`` - and if there have been commits since
59-
you last checked, ``upstream/master`` will change after you do the fetch.
58+
(remote/branchname) ``upstream/main`` - and if there have been commits since
59+
you last checked, ``upstream/main`` will change after you do the fetch.
6060

6161
.. _make-feature-branch:
6262

@@ -79,7 +79,7 @@ what the changes in the branch are for. For example ``add-ability-to-fly``, or
7979
# Update the mirror of trunk
8080
git fetch upstream
8181
# Make new feature branch starting at current trunk
82-
git branch my-new-feature upstream/master
82+
git branch my-new-feature upstream/main
8383
git checkout my-new-feature
8484

8585
Generally, you will want to keep your feature branches on your public github_
@@ -180,7 +180,7 @@ Delete a branch on github
180180

181181
::
182182

183-
git checkout master
183+
git checkout main
184184
# delete branch locally
185185
git branch -D my-unwanted-branch
186186
# delete branch on github
@@ -210,14 +210,14 @@ Now all those people can do::
210210

211211
git clone https://github.com/your-user-name/matplotlib.git
212212

213-
Remember that links starting with ``https`` or ``git@`` are read-write, and that
213+
Remember that links starting with ``https`` or ``git@`` are read-write, and that
214214
``git@`` uses the ssh protocol; links starting with ``git://`` are read-only.
215215

216216
Your collaborators can then commit directly into that repo with the
217217
usual::
218218

219219
git commit -am 'ENH - much better code'
220-
git push origin master # pushes directly into your repo
220+
git push origin main # pushes directly into your repo
221221

222222
Explore your repository
223223
-----------------------
@@ -284,12 +284,12 @@ To do a rebase on trunk::
284284
# make a backup in case you mess up
285285
git branch tmp cool-feature
286286
# rebase cool-feature onto trunk
287-
git rebase --onto upstream/master upstream/master cool-feature
287+
git rebase --onto upstream/main upstream/main cool-feature
288288

289289
In this situation, where you are already on branch ``cool-feature``, the last
290290
command can be written more succinctly as::
291291

292-
git rebase upstream/master
292+
git rebase upstream/main
293293

294294
When all looks good you can delete your backup branch::
295295

doc/devel/gitwash/dot2_dot3.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,22 @@
77
Thanks to Yarik Halchenko for this explanation.
88

99
Imagine a series of commits A, B, C, D... Imagine that there are two
10-
branches, *topic* and *master*. You branched *topic* off *master* when
11-
*master* was at commit 'E'. The graph of the commits looks like this::
10+
branches, *topic* and *main*. You branched *topic* off *main* when
11+
*main* was at commit 'E'. The graph of the commits looks like this::
1212

1313

1414
A---B---C topic
1515
/
16-
D---E---F---G master
16+
D---E---F---G main
1717

1818
Then::
1919

20-
git diff master..topic
20+
git diff main..topic
2121

2222
will output the difference from G to C (i.e. with effects of F and G),
2323
while::
2424

25-
git diff master...topic
25+
git diff main...topic
2626

2727
would output just differences in the topic branch (i.e. only A, B, and
2828
C).

doc/devel/gitwash/git_links.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
.. _linux git workflow: https://www.mail-archive.com/[email protected]/msg39091.html
4747
.. _git parable: http://tom.preston-werner.com/2009/05/19/the-git-parable.html
4848
.. _git foundation: https://matthew-brett.github.io/pydagogue/foundation.html
49-
.. _deleting master on github: https://matthew-brett.github.io/pydagogue/gh_delete_master.html
49+
.. _deleting main on github: https://matthew-brett.github.io/pydagogue/gh_delete_master.html
5050
.. _rebase without tears: https://matthew-brett.github.io/pydagogue/rebase_without_tears.html
5151
.. _resolving a merge: https://schacon.github.io/git/user-manual.html#resolving-a-merge
5252
.. _ipython git workflow: https://mail.python.org/pipermail/ipython-dev/2010-October/005632.html

doc/devel/gitwash/maintainer_workflow.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Integrating changes
2626
*******************
2727

2828
Let's say you have some changes that need to go into trunk
29-
(``upstream-rw/master``).
29+
(``upstream-rw/main``).
3030

3131
The changes are in some branch that you are currently on. For example, you are
3232
looking at someone's changes like this::
@@ -47,7 +47,7 @@ If there are only a few commits, consider rebasing to upstream::
4747
# Fetch upstream changes
4848
git fetch upstream-rw
4949
# rebase
50-
git rebase upstream-rw/master
50+
git rebase upstream-rw/main
5151

5252
Remember that, if you do a rebase, and push that, you'll have to close any
5353
github pull requests manually, because github will not be able to detect the
@@ -59,7 +59,7 @@ A long series of commits
5959
If there are a longer series of related commits, consider a merge instead::
6060

6161
git fetch upstream-rw
62-
git merge --no-ff upstream-rw/master
62+
git merge --no-ff upstream-rw/main
6363

6464
The merge will be detected by github, and should close any related pull requests
6565
automatically.
@@ -76,11 +76,11 @@ Now, in either case, you should check that the history is sensible and you have
7676
the right commits::
7777

7878
git log --oneline --graph
79-
git log -p upstream-rw/master..
79+
git log -p upstream-rw/main..
8080

8181
The first line above just shows the history in a compact way, with a text
8282
representation of the history graph. The second line shows the log of commits
83-
excluding those that can be reached from trunk (``upstream-rw/master``), and
83+
excluding those that can be reached from trunk (``upstream-rw/main``), and
8484
including those that can be reached from current HEAD (implied with the ``..``
8585
at the end). So, it shows the commits unique to this branch compared to trunk.
8686
The ``-p`` option shows the diff for these commits in patch form.
@@ -90,9 +90,9 @@ Push to trunk
9090

9191
::
9292

93-
git push upstream-rw my-new-feature:master
93+
git push upstream-rw my-new-feature:main
9494

95-
This pushes the ``my-new-feature`` branch in this repository to the ``master``
95+
This pushes the ``my-new-feature`` branch in this repository to the ``main``
9696
branch in the ``upstream-rw`` repository.
9797

9898
.. include:: links.inc

0 commit comments

Comments
 (0)