Git best practices & FAQ

Updated almost 6 years ago

Can I have my project's git repository hosted by the IT department?

Yes, there already are projects here:
Please always sign in with your Pasteur account or else you won't be able to create new repositories.
Once you log in with a GitHub or a Google account, you become an external user and lose your project management privileges.
Then you have to contact to ask an Administrator to change your status.

Can I have a "personal" git repo in my home directory on atlas?


What is the maximum size for a git repository?

Officially, there is no maximum size but when repositories become too big, problems arise.
A reasonable size for a git repository is approx 1GB.

Are there files that I should avoid putting in a git repository?

  • data files,
  • binary files,
  • files bigger than 1 MB

should not be put in a git repository.

So where can I put data files?

  • In your home directory if you are the only person who need access to it.
  • In a project space if other persons need access to it.

How can I get a project space?

Send an email to

Why do big files cause problems in git?

Because git makes all its file comparisons in memory. So you are likely to have problems since memory is limited on machines.

Why shouldn't I issue git commands on

Because it may require a lot of memory if you have big files and that may crash the machine. Remember that that machine is used by many people.

So, how can I clone and do any operation on the git repository that is in my HOME?

Mount your home on your personal computer or workstation and access it as if it was located on your machine.

git clone path_to_mounted_home_on_my_machine/my_git_repo.git my_local_repo

Example on OS X:

git clone  /Volumes/\@home/path/to/the/git/repo/my_git_repo.git   my_local_repo

You can also use git over ssh (if your repo is of reasonnable size): git clone yourlogin@remote/path/to/the/git/repo

git clone  my_local_repo

Warning: regarding the Pasteur GitLab, you have to create an ssh key before being able to clone a repository. Once done, you can do

git clone   my_local_repo

How to mount my home directory?

From Windows and OS X, machines with the Pasteur homemade master should already have a shortcut to @home. If not, send an email to

On Linux, have a look at

How to avoid commiting certain types of files?

You can use a .gitignore file. Do some google search to see how. It is explained at many places. For example:

I made a mistake and pushed a big data file to my git repo; what can I do?

The problem is that even if you remove the file, it will stay in git history. So the repository will remain big.
You can either:
  • (easiest way) create a new git repository where you will put only the necessary files and not the big one,
  • rewrite history. You can use the BFG Repo-Cleaner . Other people using the repo will have to git clone it again if you do that.