-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Improve git setup instructions #20102
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
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,59 @@ | |
Setting up Matplotlib for development | ||
===================================== | ||
|
||
.. note:: | ||
|
||
Setting up everything correctly and working with git can be challenging for | ||
new contributors. If you have difficulties, feel free to ask for help. We | ||
have a dedicated :ref:`contributor-incubator` channel on gitter for | ||
onboarding new contributors. | ||
|
||
Setting up git and retrieving the latest version of the code | ||
============================================================ | ||
|
||
Matplotlib is hosted on `GitHub <https://github.com/matplotlib/matplotlib>`_. | ||
To contribute you will need to sign up for a `free GitHub account | ||
<https://github.com/signup/free>`_. | ||
|
||
GitHub uses Git for version control, which allows many people to work together | ||
on the project. See the following links for more information: | ||
|
||
- `GitHub help pages <https://help.github.com/>`_ | ||
- `NumPy documentation <https://numpy.org/doc/stable/dev/index.html>`_ | ||
- `pandas documentation <https://pandas.pydata.org/docs/development/contributing.html#working-with-the-code>`_ | ||
|
||
Forking | ||
------- | ||
Go to https://github.com/matplotlib/matplotlib and click the ``Fork`` button in | ||
the top right corner to create your `own copy of the project <https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-forks>`_. | ||
|
||
Now clone your fork to your machine (`GitHub help: cloning <https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository>`_): | ||
|
||
.. code-block:: bash | ||
|
||
git clone https://github.com/your-user-name/matplotlib.git | ||
|
||
This creates a directory :file:`matplotlib` under your current working | ||
directory with the Matplotlib source code. Change into it: | ||
|
||
.. code-block:: bash | ||
|
||
cd matplotlib | ||
|
||
and connect to the official Matplotlib repository under the remote name | ||
``upstream`` (`GitHub help: add remote <https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/configuring-a-remote-for-a-fork>`_): | ||
|
||
.. code-block:: | ||
|
||
git remote add upstream https://github.com/matplotlib/matplotlib.git | ||
|
||
Instead of cloning using the ``https://`` protocol, you can use the ssh | ||
protocol (``git clone [email protected]:your-user-name/matplotlib.git``). This | ||
needs `additional configuration`_ but lets you connect to GitHub without | ||
having to enter your username and password. | ||
|
||
.. _additional configuration: https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh | ||
|
||
.. _dev-environment: | ||
|
||
Creating a dedicated environment | ||
|
@@ -28,23 +81,6 @@ and activated with one of the following:: | |
Whenever you plan to work on Matplotlib, remember to activate the development | ||
environment in your shell. | ||
|
||
Retrieving the latest version of the code | ||
========================================= | ||
|
||
Matplotlib is hosted at https://github.com/matplotlib/matplotlib.git. | ||
|
||
You can retrieve the latest sources with the command (see | ||
:ref:`set-up-fork` for more details):: | ||
|
||
git clone https://github.com/matplotlib/matplotlib.git | ||
|
||
This will place the sources in a directory :file:`matplotlib` below your | ||
current working directory. | ||
|
||
If you have the proper privileges, you can use ``git@`` instead of | ||
``https://``, which works through the ssh protocol and might be easier to use | ||
if you are using 2-factor authentication. | ||
|
||
Installing Matplotlib in editable mode | ||
====================================== | ||
Install Matplotlib in editable mode from the :file:`matplotlib` directory | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess I'm just thinking a bit of explanation beyond the amorphous "connect". i.e.