Cloning and forking repositories from GitHub Desktop

You can use GitHub Desktop to clone and fork repositories that exist on GitHub.

About local repositories

Repositories on GitHub are remote repositories. You can clone or fork a repository with GitHub Desktop to create a local repository on your computer.

You can create a local copy of any repository on GitHub that you have access to by cloning the repository. If you own a repository or have write permissions, you can sync between the local and remote locations. For more information, see "Syncing your branch."

When you clone a repository, any changes you push to GitHub will affect the original repository. To make changes without affecting the original project, you can create a separate copy by forking the repository. You can create a pull request to propose that maintainers incorporate the changes in your fork into the original upstream repository. For more information, see "About forks."

When you try to use GitHub Desktop to clone a repository that you do not have write access to, GitHub Desktop will prompt you to create a fork automatically. You can choose to use your fork to contribute to the original upstream repository or to work independently on your own project. Any existing forks default to contributing changes to their upstream repositories. You can modify this choice at any time. For more information, see "Managing fork behavior".

You can also clone a repository directly from GitHub or GitHub Enterprise. For more information, see "Cloning a repository from GitHub to GitHub Desktop".

Cloning a repository

  1. In the File menu, click Clone Repository.

    Clone menu option in the Mac app

    Clone menu option in the Windows app

  2. Click the tab that corresponds to the location of the repository you want to clone. You can also click URL to manually enter the repository location.

    Location tabs in the Clone a repository menu

    Location tabs in the Clone a repository menu

  3. Choose the repository you want to clone from the list.

    Clone a repository list

    Clone a repository list

  4. Click Choose... and navigate to a local path where you want to clone the repository.

    The choose button

    The choose button

  5. Click Clone.

    The clone button

    The clone button

Forking a repository

If you clone a repository that you do not have write access to, GitHub Desktop will create a fork. After creating or cloning a fork, GitHub Desktop will ask how you are planning to use the fork.

  1. In the File menu, click Clone Repository.

    Clone menu option in the Mac app

    Clone menu option in the Windows app

  2. Click the tab that corresponds to the location of the repository you want to clone. You can also click URL to manually enter the repository location.

    Location tabs in the Clone a repository menu

    Location tabs in the Clone a repository menu

  3. Choose the repository you want to clone from the list.

    Clone a repository list

    Clone a repository list

  4. Click Choose... and navigate to a local path where you want to clone the repository.

    The choose button

    The choose button

  5. Click Clone.

    The clone button

    The clone button

  6. If you plan to use this fork for contributing to the original upstream repository, click To contribute to the parent project.

    Contribute to the parent project menu option

    Contribute to the parent project menu option

  7. If you plan to use this fork for a project not connected to the upstream, click For my own purposes.

    Contribute to an independent project menu option

    Contribute to an independent project menu option

  8. Click Continue.

    The continue button

    The continue button

Managing fork behavior

You can change how a fork behaves with the upstream repository in GitHub Desktop.

  1. Open the Repository menu, then click Repository settings....

    Repository settings menu option in the Mac app

    Repository settings menu option in the Windows app

  2. Click Fork behavior, then select how you want to use the fork.

    The contribute to the parent repository option in the Fork Behavior menu

    The contribute to the parent repository option in the Fork Behavior menu

  3. Click Save.

    The save button in the Fork Behavior menu

    The save button in the Fork Behavior menu

Creating an alias for a local repository

You can create an alias for a local repository to help differentiate between repositories of the same name in GitHub Desktop. Creating an alias does not affect the repository's name on GitHub. In the repositories list, aliases appear in italics.

  1. In the upper-left corner of GitHub Desktop, to the right of the current repository name, click .
  2. Right-click the repository you want to create an alias for, then click Create Alias.
  3. Type an alias for the repository.
  4. Click Create Alias.

Further reading

Did this doc help you?

Privacy policy

Help us make these docs great!

All GitHub docs are open source. See something that's wrong or unclear? Submit a pull request.

Make a contribution

Or, learn how to contribute.