Skip to main content

unfork

Checks a forked module out from its upstream again, once upstream has everything the fork adds.

pnpm dist unfork <name> [--to <ref>] [--major] [--force] [--no-fetch]
apps/id is checked out from https://github.com/fairgarden/id.git again, at v1.2.1.
Commit .gitmodules and apps/id here. The fork itself is left as it is.

Without --to, it goes back to the oldest upstream release, from the pinned one on, that has all of the fork's work — going back is not the moment to upgrade as well; bump is. "Has all of it" is checked by merging the fork into the release without touching anything, so it holds however upstream took the changes. See Forking a module.

It refuses when nothing upstream has released has all of it yet, listing what would be lost:

Upstream has not taken everything apps/id adds yet:
  3f2a91c Fix the login redirect
Keep the fork until it has, or pass --to <tag> --force to go back without them.

Options

OptionMeaning
--to <ref>an upstream tag, branch or commit to go back to instead
--forcego back to --to even though it lacks some of the fork's work
--majorallow the release it finds to be a major upgrade
--no-fetchuse upstream's refs already fetched

Going back is noted in the distribution's changelog, with the release it went back at.