Cloning and forking repositories from GitHub Desktop …

Posted: October 30, 2021 at 3:04 pm

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".

In the File menu, click Clone Repository.

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.

Choose the repository you want to clone from the list.

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

Click Clone.

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.

In the File menu, click Clone Repository.

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.

Choose the repository you want to clone from the list.

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

Click Clone.

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

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

Click Continue.

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

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

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

Click Save.

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.

Read more from the original source:

Cloning and forking repositories from GitHub Desktop ...

Related Posts