Installing Git

Using git will make it easier to access the course files in RStudio.

Here’s how to get it.

On Linux, it’s probably already installed. Any package manager will include a git install.

On Windows, just follow the official instructions.

On OS X, you’ll need to install the “XCode command line tools.”

There are instructions online for doing this: the precise mechanism varies by operating system. You can always upgrade to Yosemite, the latest version, and follow these instructions. But don’t feel the need to upgrade if you’re on an old machine: it may slow you down.

On some versions, that will install git directly. But if you want to install more command-line tools, it may be worthwhile (on a Mac) also installing a program called homebrew. 

To install it, open the application “terminal,” and paste the following:

ruby -e "$(curl -fsSL"

Follow the prompts. It will require your password.

Afterwards, you can install the latest version of git. The way to do this is to type at the command line:

brew install git

This works for all sorts of programs: you can also, for example, upgrade to the latest version of R by typing

brew install R

Some R packages you may encounter on your own have complicated “dependencies:” that is, they may need some other set of programs installed. (For example, to do advanced mapping in R, you may need the gdal toolset). `brew install XXX` will frequently let you install a program without even having to find its website.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>