Git is a version control system installed in all GeoLab environments. You can clone repositories from GitHub or any other platform directly into your GeoLab environment.
You are responsible for managing the repositories you clone. Per the Acceptable Use Policy, GeoLab administrators are not responsible for issues arising from repository management.
Learning Git¶
There are many, many resources for learning to use git. While GeoLab does have an integrated git dashboard on the sidebar, we recommend learning the git CLI (command line interface) so your learning is portable to any future compute environments you might find yourself in. Once you understand git on the command line, using any version of a git GUI is an easy transition.
Recommended resources:
Happy Git — While targeted at R users, very little of this guide is R-specific; it’s an excellent resource for all git learners
Git in GeoLab¶
Once you’ve logged into GeoLab, you can use git from the command line in the terminal.
There is also a visual git GUI extension available by clicking the git icon
on the left sidebar.
Connecting Accounts¶
If you have a github or gitlab account and wish to sync projects to it from GeoLab, you will need to run a few configuration steps. Note, git account setup is not required to clone a public repository.
1. Tell git who you are¶
In the terminal, run the following commands:
git config --global user.name "Your Name"
git config --global user.email "your_email@example.com"You’ll only need to do this once. Your configs will be stored to a file if you ever need to modify them.
2. Authenticate¶
Depending on how your git accounts are configured, you may need to provide authentication when syncing code to/from your remote repository.
Option 1 - enter your password every time you make a push to your remote.
Option 2 - set up an ssh key (instructions coming soon)
Best Practices¶
Avoid nested repository cloning (cloning a repository inside another repository), and keep all your clones in a single directory —
/home/jovyan/is a good choice.