A fork is a new instance of an element. When you change a fork, its parent element remains unchanged. In Postman, you can fork collections, environments, and specifications. Forking enables you to contribute to an element without having Editor access for that element.
When you fork an element, you create a copy of it in a different workspace. You must sign in to Postman to create a fork. To fork an element within a public workspace, you must make your profile public.
To fork an element, do the following:
If there are any mocks or monitors associated with the parent element, they aren’t linked to the forked element. You must create mocks and monitors specifically for the fork if you need them.
To change a forked collection or environment’s label, do the following:
When you hover over a forked element’s label in the sidebar, you can view information about the fork. Information includes the source of the fork, who created it, and when the fork was created. Click the name of the source element to open it. To share a forked collection or specification with collaborators, click Copy URL.
For collections and environments, you can also view details about forks and the users who have created them. This enables you to identify the users who are actively consuming and contributing to your APIs.
To view all the forks for collections or environments, do the following:
You can pull updates from a parent element into a fork without going through the pull request process. Forked multi-protocol collections don’t support pulling updates, merging changes, or resolving conflicts.
To pull updates from a parent collection or environment during the pull request process, see Pulling updates during a pull request.
Specifications use fast-forward merging and replace changes in the fork with changes from the parent element when you pull updates.
If you have Editor access on the element, you can merge a fork into the parent element without going through the pull request process. For example, if you’re using forks to organize the work in your workspace, you can merge changes in a fork directly back into the parent element. If you’re collaborating with others, merging directly lacks the safeguards built into the pull request process. Many teams require pull requests as part of their version control workflow.
To merge changes from a fork, do the following:
In the sidebar, select View more actions > Merge changes next to the forked element.
Review the diff and click Merge All Changes.
Select one of the following merge options:
Click Merge.
To merge changes during the pull request process, see Merge changes from a pull request.
A merge conflict happens when you try to merge changes into an updated parent element and Postman isn’t able to automatically resolve the differences between the two. If there’s a conflict when you try to merge a fork, you’ll need to decide how you want to resolve it before continuing.
Merge conflicts can involve changes in more than one workspace.
To resolve a merge conflict from a fork, do the following:
In the sidebar, select View more actions > Merge changes next to the forked element.
Next to a merge conflict, click Pull the changes to pull the updates from the parent element into your fork.
Choose the changes you want to include when you merge:
Click Pull Changes to pull updates from the parent element into your fork.