```eval_rst .. _git: ``` # Downloading the code ## Git [Git](https://git-scm.com/) is the version control system adopted within the NNPDF Collaboration. Among other things, Git allows multiple people to edit code simultaneously; it allows users to track changes to the code, i.e. a user can see who edited what and when; and, it allows a user to view any past version of the code. The latter two points are particularly useful for running tests should a bug be introduced to the code, for example. ### Learning Git Using Git can be slightly confusing at first, but by mastering a few basic commands you will be able to do most of the tasks that you need to do day-to-day. Git also has the advantage that at the moment it is probably the most popular version control system out there, so any time you in invest in learning Git will most likely be useful for projects outside of NNPDF. Many online tutorials and guides exist for learning Git, but here are two that I have used before: a [quick guide](http://rogerdudler.github.io/git-guide/) and a more in depth [tutorial](https://www.codecademy.com/learn/learn-git). The [official documentation](https://git-scm.com/docs) might be useful as well. ## GitHub and GitLab The NNPDF code is stored on two Git-supporting servers: * [GitHub](https://github.com/), which is a private code development platform that allows its users to view code on the web, propose changes to the code, and discuss and review code. NNPDF has access to unlimited free private repositories on GitHub as well as [Git Large File Storage](https://git-lfs.github.com/) and [Travis](https://travis-ci.com/) support. Several guides to using GitHub can be found on their [website](https://guides.github.com/). * [GitLab](https://gitlab.cern.ch/NNPDF) at CERN, where a mirror copy of the GitHub repositories are backed up. Note that GitLab was originally used by NNPDF instead of GitHub, but problems were encountered since the number of users without CERN accounts is limited and these users cannot make use of the advanced tools that GitLab offers. ### The NNPDF github repositories The following is a list of the repositories that are available on GitHub as part of the NNPDF organization. To use the code it is not a requirement that you download any of these yourself, since the NNDPF code needed to e.g. run a fit is available in conda packages (see [Installation using conda](installation.md)). However, if you wish to develop the code then it is required that you download the repository/repositories that you wish to work on. You must then install the relevant code yourself (see [Installation from source](installation-source.md)). When downloading the code, it is recommended that you create a folder (below called `nnpdfgit`) into which you clone the desired repositories. This way all code related to NNPDF is in one place. ```bash mkdir nnpdfgit cd nnpdfgit git clone git@github.com:NNPDF/nnpdf.git # The main body of NNPDF code: validphys, n3fit and buildmaster git clone https://github.com/scarrazza/apfel.git # Handles the DGLAP PDF evolution as well as the production of NNLO DIS predictions git clone git@github.com:NNPDF/applgrids.git # Where APPLgrids get stored git clone git@github.com:NNPDF/apfelcomb.git # Turns APPLgrids into FK tables git clone git@github.com:NNPDF/reportengine.git # A framework for data analysis that validphys relies on ```