Forks allow you to create a personal isolated copy of another repository. A fork contains all code, commit history, and the main branch or all branches and tags of the original repository.
The main purpose of forks is to simplify the process of making changes to someone else's projects, including open source. You are free to experiment, add new features, or fix bugs, and then propose your changes back to the main project through pool requests.
To create a fork, you need the permissions to read the original repository. To create a fork from an existing one, you need permissions to read all the repositories in the chain. For more information, see Access management in SourceCraft.
Select the repository you want to create a fork from.
In the top-right corner, click Fork.
On the page that opens, under Your new repository details, set the fork repository parameters:
In the Owner field, select the organization to create the repository in.
In the Name field, specify a name for the repository.
The name must be unique within the organization. The name may contain the following ASCII characters: lowercase and uppercase Latin letters, numbers, commas, hyphens, and underscores.
The address to access the repository at is displayed below the name.
Optionally, in the Description field, enter a description for the repository.
Choose whether to copy only the main branch or all branches and tags of the original repository.
Create a pull request from the fork repository branch to the original repository branch:
Go to Pull requests under Code on the fork repository page.
In the top-right corner, click Create pull request.
Under source in the source list, select the fork repository branch with the changes you want to add.
Under target:
Select the original repository in the repository list.
In the target list, select the branch you want to add changes to.
Enter a name for the pull request.
Optionally, provide details of the changes in the pull request.
Optionally, view the changes:
The Files changed tab gives a list of modified files and the changes made to them in .diff format.
To view the changes in before/after format, click .
To view all files in the branch you want to pull changes from, click Full tree.
The Commits tab shows the commit history for the branch you want to pull changes from.
Optionally, under Reviewers, select the pull request reviewers.
Click Publish pull request.
You can also save your pull request as a draft to complete it later instead of creating it right away. To do this, click Save as Draft.
Note
Pull request CI/CD processes from the fork repository branch to the original repository branch can only be started by users with the Repository developer or Repository maintainer role in the original repository. In such pull requests, automatic start of CI/CD processes is disabled.