Skip to content

Git#

Course overview#

GitHub repository 25 Oct 2024 - 13:30 - 17:30

Git is a widely used system (both in academia and industry) for version controlling files and collaborating on code. It is used to track changes in (text) files, thereby establishing a history of all edits made to each file, together with short messages about each change and information about who made it. Git is mainly run from the command line, but there are several tools that have implemented a graphical user interface to run Git commands.

Using version control for tracking your files, and edits to those, is an essential step in making your computational research reproducible. A typical Git workflow consists of:

  • Making distinct and related edits to one or several files
  • Committing those changes (i.e. telling Git to add those edits to the history, together with a message about what those changes involve)
  • Pushing the commit to a remote repository (i.e. syncing your local project directory with one in the cloud)

There are many benefits of using Git in your research project:

  • You are automatically forced into a more organized way of working, which is usually a first step towards reproducibility.
  • If you have made some changes to a file and realize that those were probably not a good idea after all, it is simple to view exactly what the changes were and revert them.
  • If there is more than one person involved in the project, Git makes it easy to collaborate by tracking all edits made by each person. It will also handle any potential conflicting edits.
  • Using a cloud-based repository hosting service (the one you push your commits to), like e.g. GitHub, GitLab, or Bitbucket, adds additional features, such as being able to discuss the project, comment on edits, or report issues.
  • If at some point your project will be published, GitHub ,GitLab or Bitbucket (or similar) are excellent places to publicly distribute your code. Other researchers can then use Git to access the code needed for reproducing your results, in exactly the state it was when used for the publication.
  • If needed, you can host private repositories on GitHub, GitLab and Bitbucket as well. This may be convenient during an ongoing research project, before it is publicly published.

These tutorials will walk you through the basics of using Git as a tool for reproducible research. The things covered in these tutorials are what you will be using most of the time in your day-to-day work with Git, but Git has many more advanced features that might be of use to you.

Application#

This course is open for members of the MIVEGEC unit from the IRD (Research Institute for Development).

** The only entry requirements for this course is a basic knowledge of Unix systems (i.e. being able to work on the command line). **

The number of participants accepted is limited to the number of people that the teacher(s) can supervise in good conditions for the learners. If we receive more applications, participants will be selected based on several criteria. Selection criteria include correct entry requirements, motivation to attend the course.

Please note that this training events do not provide any formal university credits.

By accepting to participate in the course, you agree to follow the Code of Conduct.

Schedule#

Day 1

Time Topic
15 min Setting up
1h 15 Distributing and version tracking your code
- Introduction to version control and Git
- Practical tutorial: Git
15 min Break
1h 15 min ... continued: Git tutorial
15 min Wrap-up Git tutorial

The above schedule is approximate; variations may occur.

Location#

This course round is given on site.
This time the training will be held in room B03 at Agropolis International (in front of IRD DRO).

Pre-course setup#

The pre-course setup page lists the installation and setup of all the tools used in the course, so make sure you've gone through them all before the course begins.

Teachers#

  • Jacques Dainat (course leader)

Contact#

To contact me, please send a mail at jacques.dainat@ird.fr.