Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Rename default branch #21371

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions 4 .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ commands:
git remote add upstream git://github.com/matplotlib/matplotlib.git
fi
git fetch upstream
if [[ "$CIRCLE_BRANCH" != "master" ]] && \
if [[ "$CIRCLE_BRANCH" != "main" ]] && \
[[ "$CIRCLE_PR_NUMBER" != "" ]]; then
echo "Merging ${CIRCLE_PR_NUMBER}"
git pull --ff-only upstream "refs/pull/${CIRCLE_PR_NUMBER}/merge"
Expand Down Expand Up @@ -126,7 +126,7 @@ commands:
export SOURCE_DATE_EPOCH="$(git log -1 --format=%at $(git describe --abbrev=0))"
# Set release mode only when deploying to devdocs.
if [ "$CIRCLE_PROJECT_USERNAME" = "matplotlib" ] && \
[ "$CIRCLE_BRANCH" = "master" ] && \
[ "$CIRCLE_BRANCH" = "main" ] && \
[ "$CIRCLE_PR_NUMBER" = "" ]; then
export RELEASE_TAG='-t release'
fi
Expand Down
4 changes: 2 additions & 2 deletions 4 .circleci/deploy-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
set -e

if [ "$CIRCLE_PROJECT_USERNAME" != "matplotlib" ] || \
[ "$CIRCLE_BRANCH" != "master" ] || \
[ "$CIRCLE_BRANCH" != "main" ] || \
[[ "$CIRCLE_PULL_REQUEST" == https://github.com/matplotlib/matplotlib/pull/* ]]; then
echo "Not uploading docs for ${CIRCLE_SHA1}"\
"from non-master branch (${CIRCLE_BRANCH})"\
"from non-main branch (${CIRCLE_BRANCH})"\
"or pull request (${CIRCLE_PULL_REQUEST})"\
"or non-Matplotlib org (${CIRCLE_PROJECT_USERNAME})."
exit
Expand Down
2 changes: 1 addition & 1 deletion 2 .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ consider the following points:
- Help with git and github is available at
https://matplotlib.org/devel/gitwash/development_workflow.html.

- Do not create the PR out of master, but out of a separate branch.
- Do not create the PR out of main, but out of a separate branch.

- The PR title should summarize the changes, for example "Raise ValueError on
non-numeric input to set_xlim". Avoid non-descriptive titles such as
Expand Down
2 changes: 1 addition & 1 deletion 2 .github/workflows/cibuildwheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Build CI wheels
on:
push:
branches:
- master
- main
- v[0-9]+.[0-9]+.x
tags:
- v*
Expand Down
2 changes: 1 addition & 1 deletion 2 .github/workflows/pr_welcome.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ jobs:

We strive to be a welcoming and open project. Please follow our
[Code of
Conduct](https://github.com/matplotlib/matplotlib/blob/master/CODE_OF_CONDUCT.md).
Conduct](https://github.com/matplotlib/matplotlib/blob/main/CODE_OF_CONDUCT.md).
10 changes: 5 additions & 5 deletions 10 README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
.. |GitHubActions| image:: https://github.com/matplotlib/matplotlib/workflows/Tests/badge.svg
.. _GitHubActions: https://github.com/matplotlib/matplotlib/actions?query=workflow%3ATests

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

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

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

.. |LGTM| image:: https://img.shields.io/lgtm/grade/python/github/matplotlib/matplotlib.svg?logo=lgtm&logoWidth=18
.. _LGTM: https://lgtm.com/projects/g/matplotlib/matplotlib
Expand Down
2 changes: 1 addition & 1 deletion 2 doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ def linkcode_resolve(domain, info):
return None

version = parse(matplotlib.__version__)
tag = 'master' if version.is_devrelease else f'v{version.public}'
tag = 'main' if version.is_devrelease else f'v{version.public}'
return ("https://github.com/matplotlib/matplotlib/blob"
f"/{tag}/lib/{fn}{linespec}")
else:
Expand Down
2 changes: 1 addition & 1 deletion 2 doc/devel/MEP/MEP19.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ great!]:

**Documentation**

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

@NelleV, I believe, generates the docs automatically and posts them on
the web to chart MEP10 progress.
Expand Down
2 changes: 1 addition & 1 deletion 2 doc/devel/MEP/template.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ MEPs go through a number of phases in their lifetime:

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

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

- **Superseded**: This MEP has been abandoned in favor of another
approach.
Expand Down
14 changes: 7 additions & 7 deletions 14 doc/devel/coding_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ When making a PR, pay attention to:

.. rst-class:: checklist

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

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

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

Expand Down Expand Up @@ -267,7 +267,7 @@ Current branches
----------------
The current active branches are

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

Expand All @@ -285,7 +285,7 @@ The current active branches are
Branch selection for pull requests
----------------------------------

Generally, all pull requests should target the master branch.
Generally, all pull requests should target the main branch.

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

We do a backport from master to v2.2.x assuming:
We do a backport from main to v2.2.x assuming:

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

Expand Down Expand Up @@ -376,4 +376,4 @@ and then continue the cherry pick:
git cherry-pick --continue

Use your discretion to push directly to upstream or to open a PR; be
sure to push or PR against the ``v2.2.x`` upstream branch, not ``master``!
sure to push or PR against the ``v2.2.x`` upstream branch, not ``main``!
6 changes: 3 additions & 3 deletions 6 doc/devel/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Contributing
This project is a community effort, and everyone is welcome to
contribute. Everyone within the community
is expected to abide by our
`code of conduct <https://github.com/matplotlib/matplotlib/blob/master/CODE_OF_CONDUCT.md>`_.
`code of conduct <https://github.com/matplotlib/matplotlib/blob/main/CODE_OF_CONDUCT.md>`_.

The project is hosted on
https://github.com/matplotlib/matplotlib
Expand Down Expand Up @@ -133,9 +133,9 @@ A brief overview is:

5. Create a branch to hold your changes::

git checkout -b my-feature origin/master
git checkout -b my-feature origin/main

and start making changes. Never work in the ``master`` branch!
and start making changes. Never work in the ``main`` branch!

6. Work on this copy, on your computer, using Git to do the version control.
When you're done editing e.g., ``lib/matplotlib/collections.py``, do::
Expand Down
30 changes: 15 additions & 15 deletions 30 doc/devel/gitwash/development_workflow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ git by following :ref:`configure-git`. Now you are ready for some real work.
Workflow summary
================

In what follows we'll refer to the upstream Matplotlib ``master`` branch, as
In what follows we'll refer to the upstream Matplotlib ``main`` branch, as
"trunk".
Comment on lines +16 to 17
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not replace trunk with main, instead of this confusing extra name?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because I did not search for trunk and did this with sed and then rejecting changes I did not want.


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

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

Consider deleting your master branch
====================================
Consider deleting your main branch
==================================

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

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

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

.. _make-feature-branch:

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

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

::

git checkout master
git checkout main
# delete branch locally
git branch -D my-unwanted-branch
# delete branch on github
Expand Down Expand Up @@ -210,14 +210,14 @@ Now all those people can do::

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

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

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

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

Explore your repository
-----------------------
Expand Down Expand Up @@ -284,12 +284,12 @@ To do a rebase on trunk::
# make a backup in case you mess up
git branch tmp cool-feature
# rebase cool-feature onto trunk
git rebase --onto upstream/master upstream/master cool-feature
git rebase --onto upstream/main upstream/main cool-feature

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

git rebase upstream/master
git rebase upstream/main

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

Expand Down
10 changes: 5 additions & 5 deletions 10 doc/devel/gitwash/dot2_dot3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@
Thanks to Yarik Halchenko for this explanation.

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


A---B---C topic
/
D---E---F---G master
D---E---F---G main

Then::

git diff master..topic
git diff main..topic

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

git diff master...topic
git diff main...topic

would output just differences in the topic branch (i.e. only A, B, and
C).
2 changes: 1 addition & 1 deletion 2 doc/devel/gitwash/git_links.inc
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
.. _linux git workflow: https://www.mail-archive.com/dri-devel@lists.sourceforge.net/msg39091.html
.. _git parable: http://tom.preston-werner.com/2009/05/19/the-git-parable.html
.. _git foundation: https://matthew-brett.github.io/pydagogue/foundation.html
.. _deleting master on github: https://matthew-brett.github.io/pydagogue/gh_delete_master.html
.. _deleting main on github: https://matthew-brett.github.io/pydagogue/gh_delete_master.html
.. _rebase without tears: https://matthew-brett.github.io/pydagogue/rebase_without_tears.html
.. _resolving a merge: https://schacon.github.io/git/user-manual.html#resolving-a-merge
.. _ipython git workflow: https://mail.python.org/pipermail/ipython-dev/2010-October/005632.html
Expand Down
14 changes: 7 additions & 7 deletions 14 doc/devel/gitwash/maintainer_workflow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Integrating changes
*******************

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

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

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

git fetch upstream-rw
git merge --no-ff upstream-rw/master
git merge --no-ff upstream-rw/main

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

git log --oneline --graph
git log -p upstream-rw/master..
git log -p upstream-rw/main..

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

::

git push upstream-rw my-new-feature:master
git push upstream-rw my-new-feature:main

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

.. include:: links.inc
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.