Track

Remotes & Collaboration

5 Lessons, then a Checkpoint of 3 Challenges.

Builds on Branching & Merging.

Lessons

Follow them in order, or play any Lesson once the Track is unlocked.

  1. Cloning

    Until now, each repository lived only on your computer. A team shares its work through a remote: another copy of the repository, usually on a server everyone…

    3 Challenges.

    New commands:

    • git clone
    • git remote -v
  2. Pushing

    Committing changes only your own repository. Nobody else sees your commits until you send them to the remote, and git push is how you send them.

    3 Challenges.

    New commands:

    • git push
    • git push -u
  3. Fetching and pulling

    Your teammates push too. Their commits reach your branch in two steps: download them, then add them to your branch.

    3 Challenges.

    New commands:

    • git fetch
    • git pull
    • git config pull.rebase
  4. A teammate got there first

    You've committed on main, and you run git push. But while you were working, a teammate pushed to main on origin too. Your push is refused:

    3 Challenges.

  5. Remote branches

    origin has branches of its own, not just main. Your repository keeps a remote-tracking branch for each of them: origin/main, origin/menu and so on. You've…

    3 Challenges.

    New commands:

    • git branch -r
    • git branch -a
    • git push --delete
    • git remote add

Checkpoint

The Track ends with a Checkpoint of 3 Challenges that use only this Track's commands and those of the Tracks it builds on. Passing the Checkpoint completes the Track, even before you have played every Lesson.

Play the Remotes & Collaboration Checkpoint