Git on Bianca
NOTE: This guide assumes you know basic git commands and will not cover how to use git as a tool.
On of the security features of Bianca is that there is no internet access from the cluster. This makes it a bit more complicated to use things like Git to collaborate on files. In this guide we will cover two use-cases; 1) collaborate with other users within the same Bianca project, and 2) collaborate with other users using Github.
1. Within the same Bianca project
Usually an external service like GitHub is used to host a remote repository (repo) that everyone pushes and pulls from. Since we don’t have an internet connection on Bianca we have to push and pull from a location within your Bianca project. Luckily that is simple to setup with git.
To create your own remote repo that everyone will push and pull from, create an empty directory somewhere in your project folder, go into it and initialize the repo.
# go to project dir cd /proj/sens2023999/ # create dir mkdir my_repo.git # go into dir cd my_repo.git # init repo git init --bare --share=group
The name of the created directory doesn’t have to end with .git but it is good for us humans to indicate that this is a repo people will use to push and pull from, and not where you will manually edit files.
To start using this repo you will clone it just like you would clone a GitHub repo.
# go to where you want to clone the repo, e.g. your home cd ~/ # clone it git clone /proj/sens2023999/my_repo.git
Now you will have a new directory named my_repo that is empty, and you can start creating your files in there. From this point onwards git will work the same way as if you were using a GitHub hosted repo to collaborate. Once you have pushed your files the others in your project can clone the repo and start pushing and pulling their changes.
2. Using Github