1
0
mirror of synced 2026-01-06 06:02:35 -05:00

Merge pull request #3210 from github/desktop-fork-flow

[GitHub Desktop] Add new working with a fork flow
This commit is contained in:
Ethan Palm
2021-02-03 16:42:39 -05:00
committed by GitHub
23 changed files with 172 additions and 31 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

View File

@@ -8,47 +8,40 @@ versions:
free-pro-team: '*'
---
### Cloning repositories
Repositories on {% data variables.product.prodname_dotcom %} exist as remote repositories. You can clone public repositories owned by other people. You can clone your own repository to create a local copy on your computer and sync between the two locations.
### About local repositories
Repositories on {% data variables.product.prodname_dotcom %} are remote repositories. You can clone or fork a repository with {% data variables.product.prodname_desktop %} to create a local repository on your computer.
You can create a local copy of any repository on {% data variables.product.product_name %} 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](/desktop/contributing-and-collaborating-using-github-desktop/syncing-your-branch)."
When you clone a repository, any changes you push to {% data variables.product.product_name %} 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](/github/collaborating-with-issues-and-pull-requests/about-forks)."
When you try to use {% data variables.product.prodname_desktop %} to clone a repository that you do not have write access to, {% data variables.product.prodname_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](#managing-fork-behavior)".
You can also clone a repository directly from {% data variables.product.prodname_dotcom %} or {% data variables.product.prodname_enterprise %}. For more information, see "[Cloning a repository from {% data variables.product.prodname_dotcom %} to {% data variables.product.prodname_desktop %}](/desktop/guides/contributing-to-projects/cloning-a-repository-from-github-to-github-desktop/)".
{% mac %}
### Cloning a repository
{% data reusables.desktop.choose-clone-repository %}
![Clone menu option in the Mac app](/assets/images/help/desktop/clone-file-menu-mac.png)
{% data reusables.desktop.cloning-location-tab %}
![Location tabs in the Clone a repository menu](/assets/images/help/desktop/choose-repository-location-mac.png)
{% data reusables.desktop.cloning-repository-list %}
![Clone a repository list](/assets/images/help/desktop/clone-a-repository-list-mac.png)
4. Click **Choose...** and, using the Finder window, navigate to a local path where you want to clone the repository.
![The choose button](/assets/images/help/desktop/clone-choose-button-mac.png)
5. Click **Clone**.
![The clone button](/assets/images/help/desktop/clone-button-mac.png)
{% data reusables.desktop.cloning-repository-list %}
{% data reusables.desktop.choose-local-path %}
{% data reusables.desktop.click-clone %}
{% endmac %}
{% windows %}
### Forking a repository
If you clone a repository that you do not have write access to, {% data variables.product.prodname_desktop %} will create a fork. After creating or cloning a fork, {% data variables.product.prodname_desktop %} will ask how you are planning to use the fork.
{% data reusables.desktop.choose-clone-repository %}
![Clone menu option in the Windows app](/assets/images/help/desktop/clone-file-menu-windows.png)
{% data reusables.desktop.cloning-location-tab %}
![Location tabs in the Clone a repository menu](/assets/images/help/desktop/choose-repository-location-win.png)
{% data reusables.desktop.cloning-repository-list %}
![Clone a repository list](/assets/images/help/desktop/clone-a-repository-list-win.png)
4. Click **Choose...** and, using Windows Explorer, navigate to a local path where you want to clone the repository.
![The choose button](/assets/images/help/desktop/clone-choose-button-win.png)
5. Click **Clone**.
![The clone button](/assets/images/help/desktop/clone-button-win.png)
{% data reusables.desktop.cloning-repository-list %}
{% data reusables.desktop.choose-local-path %}
{% data reusables.desktop.click-clone %}
{% data reusables.desktop.fork-type-prompt %}
{% endwindows %}
### Managing fork behavior
You can change how a fork behaves with the upstream repository in {% data variables.product.prodname_desktop %}.
### Forking repositories
To contribute to a project where you don't have write access, you can use {% data variables.product.prodname_desktop %} to create a fork of the repository. Changes on your fork don't affect the original repository. You can commit changes on your fork, then open a pull request to the original repository with your proposed changes. For more information, see "[About forks](/github/collaborating-with-issues-and-pull-requests/about-forks)."
{% data reusables.desktop.open-repository-settings %}
{% data reusables.desktop.select-fork-behavior %}
1. If you've cloned a repository where you don't have write access and try to commit changes, {% data variables.product.prodname_desktop %} will warn that "You don't have write access to **REPOSITORY**. Click **create a fork**.
![Create a fork link](/assets/images/help/desktop/create-a-fork.png)
3. Click **Fork this repository**.
![Fork this repo button](/assets/images/help/desktop/fork-this-repo-button.png)
4. To view your fork on {% data variables.product.prodname_dotcom %}, in the top right corner of {% data variables.product.prodname_dotcom %}, click your profile picture, then click **Your repositories**.
![Your repositories link](/assets/images/help/profile/your-repositories.png)
### Further reading
- [About remote repositories](/github/using-git/about-remote-repositories)

View File

@@ -1 +1,13 @@
1. In the **File** menu, click **Clone Repository**.
{% mac %}
![Clone menu option in the Mac app](/assets/images/help/desktop/clone-file-menu-mac.png)
{% endmac %}
{% windows %}
![Clone menu option in the Windows app](/assets/images/help/desktop/clone-file-menu-windows.png)
{% endwindows %}

View File

@@ -0,0 +1,13 @@
1. Click **Choose...** and navigate to a local path where you want to clone the repository.
{% mac %}
![The choose button](/assets/images/help/desktop/clone-choose-button-mac.png)
{% endmac %}
{% windows %}
![The choose button](/assets/images/help/desktop/clone-choose-button-win.png)
{% endwindows %}

View File

@@ -0,0 +1,14 @@
1. Click **Clone**.
{% mac %}
![The clone button](/assets/images/help/desktop/clone-button-mac.png)
{% endmac %}
{% windows %}
![The clone button](/assets/images/help/desktop/clone-button-win.png)
{% endwindows %}

View File

@@ -1 +1,13 @@
1. 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.
{% mac %}
![Location tabs in the Clone a repository menu](/assets/images/help/desktop/choose-repository-location-mac.png)
{% endmac %}
{% windows %}
![Location tabs in the Clone a repository menu](/assets/images/help/desktop/choose-repository-location-win.png)
{% endwindows %}

View File

@@ -1 +1,14 @@
1. Choose the repository you want to clone from the list.
{% mac %}
![Clone a repository list](/assets/images/help/desktop/clone-a-repository-list-mac.png)
{% endmac %}
{% windows %}
![Clone a repository list](/assets/images/help/desktop/clone-a-repository-list-win.png)
{% endwindows %}

View File

@@ -0,0 +1,42 @@
1. If you plan to use this fork for contributing to the original upstream repository, click **To contribute to the parent project**.
{% mac %}
![Contribute to the parent project menu option](/assets/images/help/desktop/mac-fork-options-prompt.png)
{% endmac %}
{% windows %}
![Contribute to the parent project menu option](/assets/images/help/desktop/windows-fork-options-prompt.png)
{% endwindows %}
2. If you plan to use this fork for a project not connected to the upstream, click **For my own purposes**.
{% mac %}
![Contribute to an independent project menu option](/assets/images/help/desktop/mac-fork-own-purposes.png)
{% endmac %}
{% windows %}
![Contribute to an independent project menu option](/assets/images/help/desktop/windows-fork-own-purposes.png)
{% endwindows %}
3. Click **Continue**.
{% mac %}
![The continue button](/assets/images/help/desktop/mac-forking-continue.png)
{% endmac %}
{% windows %}
![The continue button](/assets/images/help/desktop/windows-forking-continue.png)
{% endwindows %}

View File

@@ -0,0 +1,14 @@
1. Open the **Repository** menu, then click **Repository settings...**.
{% mac %}
![Repository settings menu option in the Mac app](/assets/images/help/desktop/mac-repository-settings.png)
{% endmac %}
{% windows %}
![Repository settings menu option in the Windows app](/assets/images/help/desktop/windows-repository-settings.png)
{% endwindows %}

View File

@@ -0,0 +1,28 @@
1. Click **Fork behavior**, then select how you want to use the fork.
{% mac %}
![The contribute to the parent repository option in the Fork Behavior menu](/assets/images/help/desktop/mac-fork-behavior-menu-contribute.png)
{% endmac %}
{% windows %}
![The contribute to the parent repository option in the Fork Behavior menu](/assets/images/help/desktop/windows-fork-behavior-menu-contribute.png)
{% endwindows %}
2. Click **Save**.
{% mac %}
![The save button in the Fork Behavior menu](/assets/images/help/desktop/mac-fork-behavior-save.png)
{% endmac %}
{% windows %}
![The save button in the Fork Behavior menu](/assets/images/help/desktop/windows-fork-behavior-save.png)
{% endwindows %}