Update Getting the latest version of MAR (code only) authored by Grailet Jean-François's avatar Grailet Jean-François
--- ---
title: Getting the latest version of MAR (code only) title: Getting the latest version of MAR (code only)
--- ---
If you're already a MAR user, there's a good chance you already have set up a `~/MAR` folder somewhere on a cluster or laboratory machine (e.g., climato.be for ULiège researchers), where you would find (some of) the content stored in a MAR repository such as [ESPECES/MAR/stable](https://gitlab.uliege.be/especes/mar/stable). If you're already a MAR user, there's a good chance you already have set up a `~/MAR` folder somewhere on a cluster or laboratory machine (e.g., climato.be for ULiège researchers), where you would find (some of) the content stored in a MAR repository such as [ESPECES/MAR/stable](https://gitlab.uliege.be/especes/mar/stable).
However, for various reasons, there's also a good chance you have already tuned some files present on this repository for your own needs, typically in `~/MAR/bin` and `~/MAR/usr`. Therefore, if you cloned or pulled the entire [ESPECES/MAR/stable repository](https://gitlab.uliege.be/especes/mar/stable) in your ``~/MAR`` folder, you may overwrite some of your own scripts in the process. However, for various reasons, there's also a good chance you have already tuned some files present on this repository for your own needs, typically in `~/MAR/bin` and `~/MAR/usr`. Therefore, if you cloned or pulled the entire [ESPECES/MAR/stable repository](https://gitlab.uliege.be/especes/mar/stable) in your ``~/MAR`` folder, you may overwrite some of your own scripts in the process.
In this tutorial, you will learn how you can get only a subset of files and/or folders from a ``git`` repository. This boils down to running a few ``git`` commands to set up a _sparse checkout_ of a repository, a feature introduced in [version 2.25 of ``git``](https://github.blog/open-source/git/highlights-from-git-2-25/) (2020). In this tutorial, you will learn how you can get only a subset of files and/or folders from a ``git`` repository. This boils down to running a few ``git`` commands to set up a _sparse checkout_ of a repository, a feature introduced in [version 2.25 of ``git``](https://github.blog/open-source/git/highlights-from-git-2-25/) (2020).
## Pre-requisites ## Prerequisites
First of all, make sure ``git`` is available on the computer where you want to synchronize your ``~/MAR`` folder with a repository from this GitLab group. You do not necessarily need the latest version, but make sure to have at the very least [version 2.25](https://github.blog/open-source/git/highlights-from-git-2-25/). First of all, make sure ``git`` is available on the computer where you want to synchronize your ``~/MAR`` folder with a repository from this GitLab group. You do not necessarily need the latest version, but make sure to have at the very least [version 2.25](https://github.blog/open-source/git/highlights-from-git-2-25/).
... ...
......