Sign inSign up free

787. Set Up Remotes for a Fork Workflow

medium 20 XP ~8 minHands-on lab

You cloned the project's main repository into /home/student/repos/data-pipeline, so origin is /srv/git/team/data-pipeline.git, which you can't push to. You've now created your own fork at /srv/git/student/data-pipeline.git.

Task

Set up the clone for the usual fork workflow:

  • The project's repository is the remote upstream (/srv/git/team/data-pipeline.git).
  • Your fork is the remote origin (/srv/git/student/data-pipeline.git).
  • Local main tracks upstream/main, so git pull gets the team's latest.
  • git push (without arguments) on a new branch pushes it to your fork under the same name: create the branch fix/typo, commit something on it, and push it so it exists on your fork.

About this machine

Ubuntu 24.04 with no internet access. You are student with passwordless sudo. The grader checks the final state of the machine, not the commands you typed. Values like names and ports are generated for you.

Part of Git Essentials. Next step: Resolve Each Conflict the Right Way

Teaching or writing about this? Embed this lab on your page

TerminalNot started

Your machine is ready to start

A fresh, isolated Ubuntu machine boots in a few seconds with the task already set up.

No account needed: 3 of 3 free tries left. Guest machines last 30 minutes.