CMPT 201: Using

Forking a repl

The "documents" (programs) you work on in repl.it are called "repls." Most of the time, for a lab we will give you a repl containing some code to start with. You will then "fork" it (make a copy in your own account) to work on. (These are terms from software development: "repl" is short for "real-eval-print loop," something that lets you type code and see immediately what happens, like the Interactions pane in jGRASP. "Forking" means to copy an existing software project so that you can create your own spin on it, which is something that is very commonly done in open source projects.)

To fork a repl, you will click the "Fork" button at the top next to the Run button:

It will then immediately make a copy of the repl under your account that you can modify.

Working together on a repl using multiplayer

After forking a repl, you can enable multiplayer so that you and your lab partner can work on it at the same time. Click the "Share" button near the top-right of the repl:

In the box that appears, click "Copy" to copy the multiplayer link.

You can share that link with your partner (for example, by pasting it into the chat window in Zoom).

When programming in multiplayer, you should be able to see whatever changes to the code your partner is making in real time. Also, whenever one of you runs the code (using the rather hard to miss Run ▶ button at the top) you can both see what happens.

Working separately after class

If you decide to finish the lab separately after class, you should BOTH fork a new copy of the lab. To fork a repl that you already own, you need to click on the title of the lab, and then click fork.

You will now have three copies of the file: the original version that you worked on together, and two versions that you will finish separately.

In Canvas, you should include the link to the repl that you completed separately. You do not need to share the original version that you worked on together but did not finish.

Tag » How To Fork A Replit