Author: Mirjana Mazuran
Git is is a free and open source distributed version control system used for tracking changes in files in an online repository (e.g. the ones hosted at https://gitlab.inria.fr) and coordinating work on those files among multiple local repositories. Git manual: https://git-scm.com/book/en/v2
Here are some examples of frequently used commands, refer to the manual for the whole range of features and commands:
- Create a local repo of an online git repo:
git clone https://gitlab.inria.fr/mmazuran/daggerWithSampling.git
creates a folder on the local machine containing all the files in the online repo - Update a local repo to sync it with the online git repo (has to be issued from within the local folder containing the repo):
git pull
- The usual modification-commit cycle is:
git add file.txt // for any file that we want to modify, whenever we want to modify it
git commit -m "changes to file.txt" // commit the changes
git push // push the changes to the online repository
- We can decide to ignore some contents in the local repo, that is, keep them on the local filesystem but prevent git from pushing them to the online repository. This is done by editing the hidden .gitignore file in the local folder (if the file does not exist it is sufficient to create it) and adding lines to it:
.DS_Store // ignore this specific file
*.csv // ignore all files with extension .csv
output/ // ignore the whole output/ folder
Maven is a software project management tool. Each Maven project is described and configured with a pom.xml file that contains information such as unique identifier for the project and all its dependencies. The information in the pom file allows Maven to build the project and run the unit tests associated with it. For example, here is a brief extract of the pom file of the daggerWithSampling project:
<project>
<!-- model version is always 4.0.0 for Maven 2.x POMs -->
<modelVersion>4.0.0</modelVersion>
<!-- project coordinates, i.e. a group of values which uniquely identify this project -->
<groupId>fr.inria.cedar</groupId>
<artifactId>daggerWithSampling</artifactId>
<version>0.0.1-SNAPSHOT</version>
<!-- list of dependencies -->
<dependencies>
<dependency>
<!-- coordinates of the required dependency -->
<groupId>fr.inria.cedar</groupId>
<artifactId>quotientSummary</artifactId>
<version>1.6-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
The daggerWithSampling projects needs the quotientSummary project; to specify other dependencies a <dependency>…</dependency> block needs to be added in the file for each dependency. Maven will automatically manage all dependency, provided that it knows where to look for them. This information is provided in the settings.xml file which is found (or needs to be created) in the .m2 hidden folder in the user directory. Be sure to have the right settings file!