Git basics

Clone just one branch

Download a single branch of a big repo, without the others.

Fill these in once
  1. Clone only that branch
    Terminal
    git clone -b develop --single-branch https://github.com/username/project.git

Check it worked

  1. Check the branch (inside the new folder)
    Terminal
    git branch --show-current
  1. Clone only that branch
    Terminal · Ubuntu / Debian
    git clone -b develop --single-branch https://github.com/username/project.git

Check it worked

  1. Check the branch (inside the new folder)
    Terminal · Ubuntu / Debian
    git branch --show-current
  1. Clone only that branch
    PowerShell
    git clone -b develop --single-branch https://github.com/username/project.git

Check it worked

  1. Check the branch (inside the new folder)
    PowerShell
    git branch --show-current