44Setting 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
962Creating a dedicated environment
@@ -28,23 +81,6 @@ and activated with one of the following::
2881Whenever you plan to work on Matplotlib, remember to activate the development
2982environment 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-
4884Installing Matplotlib in editable mode
4985======================================
5086Install Matplotlib in editable mode from the :file: `matplotlib ` directory
0 commit comments