Checking Out or Cloning a Repository

Check out or clone a repository to create a copy on your local system.

bullet
To check out or clone a repository
  1. In the repositories organizer, click the Add button and choose Checkout or Clone Repository.

  2. Enter the pathname or URL for the file.

  3. When the “Host is reachable” indicator turns green, click the Next button.

  4. Enter a local name for the repository and click Clone (or Checkout) to copy it.

  5. Choose a location and click the highlighted Clone (or Checkout) button to save the local repository.

    The video shows cloning a Git repository for the Sketch sample code project.

By abstracting common repository operations, Xcode supports both Git and Subversion (SVN) repositories with a single, unified graphical user interface and workflow. Depending on your choice, this one operation checks out (for SVN) or clones (for Git) the repository and integrates it with your project.

Cloning a Git repository in Xcode sets up a complete repository on your local system and integrates that repository with your workspace so that you can quickly start using it. This approach gives you the benefits of distributed version control, including full commit rights, whether you’re online or not.

An SVN checkout operation does not create a local repository. You must have a network connection to the repository server to be able to commit changes.

For SVN, you must also provide the relative paths to the trunk, branches, and tags directories. To do so, click the name of the new repository in the repositories organizer and fill in the associated fields. If your SVN server requires authentication, fill in the user name and password as well.

Related Articles

  • About the Organizer Window