Merge pull request #3210 from github/desktop-fork-flow
[GitHub Desktop] Add new working with a fork flow
BIN
assets/images/help/desktop/mac-fork-behavior-menu-contribute.png
Normal file
|
After Width: | Height: | Size: 50 KiB |
BIN
assets/images/help/desktop/mac-fork-behavior-menu-own.png
Normal file
|
After Width: | Height: | Size: 49 KiB |
BIN
assets/images/help/desktop/mac-fork-behavior-save.png
Normal file
|
After Width: | Height: | Size: 47 KiB |
BIN
assets/images/help/desktop/mac-fork-options-prompt.png
Normal file
|
After Width: | Height: | Size: 52 KiB |
BIN
assets/images/help/desktop/mac-fork-own-purposes.png
Normal file
|
After Width: | Height: | Size: 54 KiB |
BIN
assets/images/help/desktop/mac-forking-continue.png
Normal file
|
After Width: | Height: | Size: 50 KiB |
BIN
assets/images/help/desktop/mac-repository-settings.png
Normal file
|
After Width: | Height: | Size: 216 KiB |
|
After Width: | Height: | Size: 58 KiB |
BIN
assets/images/help/desktop/windows-fork-behavior-menu-own.png
Normal file
|
After Width: | Height: | Size: 58 KiB |
BIN
assets/images/help/desktop/windows-fork-behavior-save.png
Normal file
|
After Width: | Height: | Size: 52 KiB |
BIN
assets/images/help/desktop/windows-fork-options-prompt.png
Normal file
|
After Width: | Height: | Size: 68 KiB |
BIN
assets/images/help/desktop/windows-fork-own-purposes.png
Normal file
|
After Width: | Height: | Size: 68 KiB |
BIN
assets/images/help/desktop/windows-forking-continue.png
Normal file
|
After Width: | Height: | Size: 60 KiB |
BIN
assets/images/help/desktop/windows-repository-settings.png
Normal file
|
After Width: | Height: | Size: 46 KiB |
@@ -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 %}
|
||||

|
||||
{% data reusables.desktop.cloning-location-tab %}
|
||||

|
||||
{% data reusables.desktop.cloning-repository-list %}
|
||||

|
||||
4. Click **Choose...** and, using the Finder window, navigate to a local path where you want to clone the repository.
|
||||

|
||||
5. Click **Clone**.
|
||||

|
||||
{% 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 %}
|
||||

|
||||
{% data reusables.desktop.cloning-location-tab %}
|
||||

|
||||
{% data reusables.desktop.cloning-repository-list %}
|
||||

|
||||
4. Click **Choose...** and, using Windows Explorer, navigate to a local path where you want to clone the repository.
|
||||

|
||||
5. Click **Clone**.
|
||||

|
||||
{% 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**.
|
||||

|
||||
3. Click **Fork this repository**.
|
||||

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

|
||||
### Further reading
|
||||
- [About remote repositories](/github/using-git/about-remote-repositories)
|
||||
|
||||
@@ -1 +1,13 @@
|
||||
1. In the **File** menu, click **Clone Repository**.
|
||||
|
||||
{% mac %}
|
||||
|
||||

|
||||
|
||||
{% endmac %}
|
||||
|
||||
{% windows %}
|
||||
|
||||

|
||||
|
||||
{% endwindows %}
|
||||
|
||||
13
data/reusables/desktop/choose-local-path.md
Normal file
@@ -0,0 +1,13 @@
|
||||
1. Click **Choose...** and navigate to a local path where you want to clone the repository.
|
||||
|
||||
{% mac %}
|
||||
|
||||

|
||||
|
||||
{% endmac %}
|
||||
|
||||
{% windows %}
|
||||
|
||||

|
||||
|
||||
{% endwindows %}
|
||||
14
data/reusables/desktop/click-clone.md
Normal file
@@ -0,0 +1,14 @@
|
||||
1. Click **Clone**.
|
||||
|
||||
{% mac %}
|
||||
|
||||

|
||||
|
||||
{% endmac %}
|
||||
|
||||
{% windows %}
|
||||
|
||||

|
||||
|
||||
{% endwindows %}
|
||||
|
||||
@@ -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 %}
|
||||
|
||||

|
||||
|
||||
{% endmac %}
|
||||
|
||||
{% windows %}
|
||||
|
||||

|
||||
|
||||
{% endwindows %}
|
||||
|
||||
@@ -1 +1,14 @@
|
||||
1. Choose the repository you want to clone from the list.
|
||||
|
||||
|
||||
{% mac %}
|
||||
|
||||

|
||||
|
||||
{% endmac %}
|
||||
|
||||
{% windows %}
|
||||
|
||||

|
||||
|
||||
{% endwindows %}
|
||||
42
data/reusables/desktop/fork-type-prompt.md
Normal 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 %}
|
||||
|
||||

|
||||
|
||||
{% endmac %}
|
||||
|
||||
{% windows %}
|
||||
|
||||

|
||||
|
||||
{% endwindows %}
|
||||
|
||||
2. If you plan to use this fork for a project not connected to the upstream, click **For my own purposes**.
|
||||
|
||||
{% mac %}
|
||||
|
||||

|
||||
|
||||
{% endmac %}
|
||||
|
||||
{% windows %}
|
||||
|
||||

|
||||
|
||||
{% endwindows %}
|
||||
|
||||
3. Click **Continue**.
|
||||
|
||||
{% mac %}
|
||||
|
||||

|
||||
|
||||
{% endmac %}
|
||||
|
||||
{% windows %}
|
||||
|
||||

|
||||
|
||||
{% endwindows %}
|
||||
|
||||
14
data/reusables/desktop/open-repository-settings.md
Normal file
@@ -0,0 +1,14 @@
|
||||
1. Open the **Repository** menu, then click **Repository settings...**.
|
||||
|
||||
{% mac %}
|
||||
|
||||

|
||||
|
||||
{% endmac %}
|
||||
|
||||
{% windows %}
|
||||
|
||||

|
||||
|
||||
{% endwindows %}
|
||||
|
||||
28
data/reusables/desktop/select-fork-behavior.md
Normal file
@@ -0,0 +1,28 @@
|
||||
1. Click **Fork behavior**, then select how you want to use the fork.
|
||||
|
||||
{% mac %}
|
||||
|
||||

|
||||
|
||||
{% endmac %}
|
||||
|
||||
{% windows %}
|
||||
|
||||

|
||||
|
||||
{% endwindows %}
|
||||
|
||||
2. Click **Save**.
|
||||
|
||||
{% mac %}
|
||||
|
||||

|
||||
|
||||
{% endmac %}
|
||||
|
||||
{% windows %}
|
||||
|
||||

|
||||
|
||||
{% endwindows %}
|
||||
|
||||