Try using git in your terminal:
$ git --version
(The $ symbol means this is typed into the terminal) If you see
git version 2.21.0
or similar go to step 3. (No $ symbol means this is output) If you see
git: command not found
or similar got to step 2.
- Install Homebrew:
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Install git using Homebrew
$ brew install git
- Test git
$ git --version
- Install git
$ sudo apt-get install git
- Test git
$ git --version
- Navigate to the directory where the code should live. By default, git will create a new subdirectory when cloning.
$ cd /path/to/your/code/dir
- Clone the repo
$ git clone git@github.com:username/reponame.git