Skip to content
jsworkbench.
Learning path
Advanced18 min

Opening a cross-repo pull request

Understand the idea

Open the pull request back toward the shared starter — the same repo the whole class forked.

The idea

git pr new class-notes their-slug:main "title" stores a whose source repository is your fork and whose target is the shared starter. That is the standard Team Simulation path. Aiming at a classmate's fork is possible later for curiosity, but the class workflow sends every request to the teacher-owned starter.

What changes

The request row records both repository ids, the branch names, status open, and an empty review list. Neither moves. The graph on your fork is unchanged. The teacher sees the request in the Maintainer Queue.

Where the request aims
CommandSourceTarget
git pr new topic main titleThe repository you have openThat same repository
git pr new topic starter-slug:main titleYour forkThe shared class starter
A later mergeStill your commitsThe starter's branch, only when the teacher merges

The command

From your fork, run the command in the practice steps. Use the class starter's slug before the colon — the same slug you forked. git status afterwards still shows your branch. The request is the new row, not a new commit.

The mistake

Check your graph

Both graphs still show the same commits as before the command. The new fact is the pull request from your branch to the starter's main.

Your repository

Open a pull request from your branch toward the class's shared starter repository.

  1. Step 1

    Propose back to the starter

    Replace greeting-kit with your class starter slug if needed. The colon aims the request at that shared repository’s main — the standard path for this phase.

  2. Step 2

    Read the request

    The pull request stores your fork as the source and the shared starter as the target. Status is open. Neither main has moved. Your teacher will see it in the Maintainer Queue.

The editor edits the working tree. Start a repository and the files appear here.

Follow the steps. Each command step can be placed in the terminal. Edit files in the editor, then stage them.
Supported command reference
  • init
  • add <path> | add .
  • commit -m "message" | commit --amend -m "message"
  • status
  • diff | diff --staged
  • log | log --oneline | log --graph | log --oneline --graph
  • show [ref]
  • branch | branch <name> | branch -d <name>
  • checkout <ref> | checkout -b <name> | switch <name> | switch -c <name>
  • merge <branch>
  • rebase <branch> | rebase -i <branch> | rebase --edit-todo <pick|drop|reword> <hash> [message] | rebase --continue | rebase --abort
  • cherry-pick <ref>
  • reset --soft <ref> | reset --mixed <ref> | reset --hard <ref>
  • revert <ref>
  • stash | stash list | stash pop | stash apply
  • restore <path> | restore --staged <path>
  • remote | remote add <name> <repo-slug>
  • clone <repo-slug> | git clone <repo-slug> | git fork <repo-slug>
  • fetch [remote] | pull [remote] [branch] | push [remote] [branch] | push --force [remote] [branch]
  • blame <path>
  • reflog
  • tag | tag <name> [ref] | tag -d <name>
  • bisect start | bisect good [ref] | bisect bad [ref] | bisect reset
  • config <key> <value> | config --list
  • write <path> <text> (workbench: edit the working tree)
  • issue new "title" | pr new <source> <target> "title" | review "comment" | review --request-changes "comment"

Commit graph

No commits yet. git init creates the first one.

Quiz

A quick check for understanding. Retry as often as you like; your learning path stays open.

01What does slug:main mean in git pr new?
02What moves when you open the pull request?

Ready to call this one understood?

Mark this lesson complete to earn 200 XP. You can always revisit it.

Sign in to save progress
Next lesson