1 First time setup - CorrelAid/project-resources GitHub Wiki

Before you get started with Git and Github in RStudio, you need to download, install and configure a few things. So please complete all the steps below before you move on to learn about the Github workflow. If you already use Git and Github you can skip all of this.

1. Install Git on your machine

Windows

You can find a Git standalone intaller from here

Download and install the correct version for your machine. Use recommended or default settings during the installation process. The options can always be changed later if needed.

Linux (Ubuntu)

Install Git from the terminal. Run

sudo apt-get update
sudo apt-get install git

Check the version of Git that you have installed with

git --version

MacOS

Some versions of MacOS come with git pre-installed. To check if you already have git, open the terminal and run

git --version

If the terminal tells you which version of Git is installed, you can skip the next steps.

If you need to install Git, you can do this with homebrew.

brew install git

Then check the version and verify the installation with

git --version

2: Install Github Desktop

There are many different ways to configure Git so it works well together with remote repositories on Github. The easiest way is to use Github Desktop which guides you through all the steps and helps you with configuration.

Github Desktop also provides an easy to use interface to work with Git repositories.

Download it from here and install it.

3. Sign in or create a Github account

Open the Github Desktop app and either Create your free account or Sign in to Github.com if you already have an account:

Send your account name to Selina so she can add you as a collaborator to the sCaleGrassDiv repository.

Tip: If you sign up for Github with an institutional email address, you can get a free upgrade to Github Pro. This gives you some additional benefits like private wikis. You can always add a second email address later or change it if you leave your institution.

4. Configure Git

If you use Git for the first time, Github desktop will ask you to configure Git. This is done so that all commits that you make are "signed" by you.

If you want to keep it simple, just chose to use your Github account name and email address:

5: First time setup of the sCaleGrassDiv repository

Now you are ready to clone the repository for the sCaleGrassDiv project to your machine. Cloning is only done once in the beginning to get the repository to your machine and to make sure that the connection with Github is working.

You can open Github Desktop and search for the sCaleGrassDiv repository in the search bar on the right. Select the repository and click on Clone on the bottom:

In the dialogue that opens, select a convenient local path on your computer where you want to clone the repository to. Remember this path because you need it to access the project.

Now just click on Clone and the repository should be cloned to the specified location. Check if everything worked correctly by going to the local path you just selected and see if the project is there.

Now you are ready to write some code and contribute it to the project. Before you do so, please make sure you are familiar with the Github workflow.