Git basics

Work on a branch someone pushed to GitHub

Get a teammate's branch onto your machine and switch to it.

Fill these in once
  1. Get the latest branches from GitHub
    Terminal
    git fetch origin
  2. Switch to it
    Terminal
    git switch fix-login-button

    Git sets it up to follow the GitHub branch for you.

Check it worked

  1. Check you're on it
    Terminal
    git status
  1. Get the latest branches from GitHub
    Terminal · Ubuntu / Debian
    git fetch origin
  2. Switch to it
    Terminal · Ubuntu / Debian
    git switch fix-login-button

    Git sets it up to follow the GitHub branch for you.

Check it worked

  1. Check you're on it
    Terminal · Ubuntu / Debian
    git status
  1. Get the latest branches from GitHub
    PowerShell
    git fetch origin
  2. Switch to it
    PowerShell
    git switch fix-login-button

    Git sets it up to follow the GitHub branch for you.

Check it worked

  1. Check you're on it
    PowerShell
    git status