Create Fork and Clone Repository

Creating Forks

A Fork refers to creating a copy of a Repository within the same organization or project. Forking a Repository generates a new copy of the original Repository, including all its code, Branches, and Commit History.

The following steps outline the process to create Forks:

  1. From Azure DevOps, select Repos.

  1. Locate and click the Repository to Fork.

  1. Click More actions and select Fork.

  1. Select All branches and click Fork. The Repository name and Project is auto populated. Change the Repository name if needed. Azure DevOps creates the Forked Repository and redirects the user to its page once the process is complete. Users clone the Forked Repository to the local machine for making changes and push them back to the Forked Repository.

Cloning Repo to Local Working Directory

When cloning the Repository, a complete copy of the project’s codebase, Commit History, and related files is created on a local machine.

The following steps outline the process of cloning a Repository to a local directory:

  1. Select the Fork to be cloned in Azure DevOps from the Work drop-down menu.

  1. Click the Clone button.

The Clone Repository dialog box appears with the Repository’s clone URL.

  1. Copy the clone URL (HTTPS or SSH). An example URL is https://dev.azure.com/{organization}/{project}/git/{repository}. Use any Version Control Tools required to clone the Repository.
  2. In the Version Control Tool’s interface, find the option to clone or create a new Repository.
  3. Paste the clone URL copied from the Azure DevOps Project.
  4. Browse to the destination directory to clone the Repository.

Optional: Depending on the tool used, additional configuration options are available during the cloning process. These could include selecting Branches, specifying authentication credentials, or choosing the desired clone depth.

7. Click the Clone button within the Version Control Tool.
8. When the cloning is completed, confirm the contents of the localRepo folder against the contents of the Fork in Azure DevOps.