Skip to content

Commit 13790cb

Browse files
committed
Improve git setup instructions
1 parent 4e10777 commit 13790cb

File tree

2 files changed

+55
-17
lines changed

2 files changed

+55
-17
lines changed

doc/devel/contributing.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ is expected to abide by our
1212
The project is hosted on
1313
https://github.com/matplotlib/matplotlib
1414

15+
.. _contributor-incubator:
16+
1517
Contributor Incubator
1618
=====================
1719

doc/devel/development_setup.rst

Lines changed: 53 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,59 @@
44
Setting up Matplotlib for development
55
=====================================
66

7+
.. note::
8+
9+
Setting up everything correctly and working with git can be challenging for
10+
new contributors. If you have difficulties, feel free to ask for help. We
11+
have a dedicated :ref:`contributor-incubator` channel on gitter for
12+
onboarding new contributors.
13+
14+
Setting up git and retrieving the latest version of the code
15+
============================================================
16+
17+
Matplotlib is hosted on `GitHub <https://github.com/matplotlib/matplotlib>`_.
18+
To contribute you will need to sign up for a `free GitHub account
19+
<https://github.com/signup/free>`_.
20+
21+
GitHub uses Git for version control, which allows many people to work together
22+
on the project. See the following links for more information:
23+
24+
- `GitHub help pages <https://help.github.com/>`_
25+
- `NumPy documentation <https://numpy.org/doc/stable/dev/index.html>`_
26+
- `pandas documentation <https://pandas.pydata.org/docs/development/contributing.html#working-with-the-code>`_
27+
28+
Forking
29+
-------
30+
Go to https://github.com/matplotlib/matplotlib and click the ``Fork`` button in
31+
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>`.
32+
33+
Now clone your fork to your machine (`GitHub help <https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository>`_):
34+
35+
.. code-block:: bash
36+
37+
git clone https://github.com/your-user-name/matplotlib.git
38+
39+
This creates a directory :file:`matplotlib` under your current working
40+
directory with the Matplotlib source code. Change into it:
41+
42+
.. code-block:: bash
43+
44+
cd matplotlib
45+
46+
and connect to the official Matplotlib repository under the remote name
47+
``upstream`` (`GitHub help <https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/configuring-a-remote-for-a-fork>`_):
48+
49+
.. code-block::
50+
51+
git remote add upstream https://github.com/matplotlib/matplotlib.git
52+
53+
Instead of cloning using the ``https://`` protocol, you can use the ssh
54+
protocol (``git clone git@github.com:your-user-name/matplotlib.git``). This
55+
needs `additional configuration`_ but lets you connect to GitHub without
56+
having to enter your username and password.
57+
58+
.. _additional configuration: https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh
59+
760
.. _dev-environment:
861

962
Creating a dedicated environment
@@ -28,23 +81,6 @@ and activated with one of the following::
2881
Whenever you plan to work on Matplotlib, remember to activate the development
2982
environment in your shell.
3083

31-
Retrieving the latest version of the code
32-
=========================================
33-
34-
Matplotlib is hosted at https://github.com/matplotlib/matplotlib.git.
35-
36-
You can retrieve the latest sources with the command (see
37-
:ref:`set-up-fork` for more details)::
38-
39-
git clone https://github.com/matplotlib/matplotlib.git
40-
41-
This will place the sources in a directory :file:`matplotlib` below your
42-
current working directory.
43-
44-
If you have the proper privileges, you can use ``git@`` instead of
45-
``https://``, which works through the ssh protocol and might be easier to use
46-
if you are using 2-factor authentication.
47-
4884
Installing Matplotlib in editable mode
4985
======================================
5086
Install Matplotlib in editable mode from the :file:`matplotlib` directory

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy