Theo Pepler

Home | Research | Teaching | Software | Links | HOWTO's

HOWTO: CLONE A GITHUB REPOSITORY AND CHECK OUT A BRANCH

  1. In the terminal, navigate to the directory on the local computer in which the GitHub repository is to be cloned.
  2. Use the following command (adapted for the required GitHub user and repository name):

    git clone https://github.com/tpepler/cpc

    (In general, use: https://github.com/github_user/repository)
  3. If you want to check out a specific branch of the repository, change directory into the local copy of the repository:

    cd cpc

    and then use the following commands to check out a branch (named mybranch, for example):

    git fetch
    git checkout mybranch