The following are very detailed instructions to accomplish these simple tasks:
- Check that Python is downloaded
- Check that the git package is downloaded
- Clone a GitHub repository!
Lets go!!
- Open the terminal.
- Check if you have Python already installed by typing
python --version. - If the first number is <3 or you don't have Python, follow these instructions to update or install python.
- Check if you have git installed by typing
git --version. - If you don't have git (or even if you do!), install Homebrew:
- This is a tool that lets you download packages more easily.
- Type
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"into the terminal. It will walk you through the steps to install via the terminal. - Now you can type
brew install gitto install git.
- Type
pip install scipyto get a package that this code needs installed on your computer. - Now let's go to the folder where we want to save (ie clone) the repository:
- To move into a specific folder, type its name like
cd Desktop. You'll see that the name of this folder is now to the left of your cursor. - You can print a list of all of the folders and files inside of this folder (called a directory) by typing
ls. - To go back to the previous folder level, type
cd .. - I suggest making a folder in your Documents called something like "GITHUB" and storing all of your cloned repositories in there. To do that, you would type:
cd Documentsmkdir GITHUBcd GITHUB
- Now we'll clone the desired repository (aka repo) by typing something like:
git clone https://github.com/water-we-doing/gas-flux-sampling. Replace water-we-doing with the user and gas-well-sampling with the repo name for other repos. - Now when you look in the your Documents/GITHUB/ folder, you should see a folder called gas-flux-sampling with files in it!