diff --git a/assets/images/help/desktop/mac-fork-behavior-menu-contribute.png b/assets/images/help/desktop/mac-fork-behavior-menu-contribute.png new file mode 100644 index 000000000000..6bf7919ac55a Binary files /dev/null and b/assets/images/help/desktop/mac-fork-behavior-menu-contribute.png differ diff --git a/assets/images/help/desktop/mac-fork-behavior-menu-own.png b/assets/images/help/desktop/mac-fork-behavior-menu-own.png new file mode 100644 index 000000000000..55c939878931 Binary files /dev/null and b/assets/images/help/desktop/mac-fork-behavior-menu-own.png differ diff --git a/assets/images/help/desktop/mac-fork-behavior-save.png b/assets/images/help/desktop/mac-fork-behavior-save.png new file mode 100644 index 000000000000..1ab6d668529b Binary files /dev/null and b/assets/images/help/desktop/mac-fork-behavior-save.png differ diff --git a/assets/images/help/desktop/mac-fork-options-prompt.png b/assets/images/help/desktop/mac-fork-options-prompt.png new file mode 100644 index 000000000000..60cb1731d853 Binary files /dev/null and b/assets/images/help/desktop/mac-fork-options-prompt.png differ diff --git a/assets/images/help/desktop/mac-fork-own-purposes.png b/assets/images/help/desktop/mac-fork-own-purposes.png new file mode 100644 index 000000000000..7ee7acc98aec Binary files /dev/null and b/assets/images/help/desktop/mac-fork-own-purposes.png differ diff --git a/assets/images/help/desktop/mac-forking-continue.png b/assets/images/help/desktop/mac-forking-continue.png new file mode 100644 index 000000000000..b8c284e177d6 Binary files /dev/null and b/assets/images/help/desktop/mac-forking-continue.png differ diff --git a/assets/images/help/desktop/mac-repository-settings.png b/assets/images/help/desktop/mac-repository-settings.png new file mode 100644 index 000000000000..fb92ae6846e8 Binary files /dev/null and b/assets/images/help/desktop/mac-repository-settings.png differ diff --git a/assets/images/help/desktop/windows-fork-behavior-menu-contribute.png b/assets/images/help/desktop/windows-fork-behavior-menu-contribute.png new file mode 100644 index 000000000000..24edeefc7419 Binary files /dev/null and b/assets/images/help/desktop/windows-fork-behavior-menu-contribute.png differ diff --git a/assets/images/help/desktop/windows-fork-behavior-menu-own.png b/assets/images/help/desktop/windows-fork-behavior-menu-own.png new file mode 100644 index 000000000000..f7d28412260c Binary files /dev/null and b/assets/images/help/desktop/windows-fork-behavior-menu-own.png differ diff --git a/assets/images/help/desktop/windows-fork-behavior-save.png b/assets/images/help/desktop/windows-fork-behavior-save.png new file mode 100644 index 000000000000..93dbddba6353 Binary files /dev/null and b/assets/images/help/desktop/windows-fork-behavior-save.png differ diff --git a/assets/images/help/desktop/windows-fork-options-prompt.png b/assets/images/help/desktop/windows-fork-options-prompt.png new file mode 100644 index 000000000000..d90ba724d15a Binary files /dev/null and b/assets/images/help/desktop/windows-fork-options-prompt.png differ diff --git a/assets/images/help/desktop/windows-fork-own-purposes.png b/assets/images/help/desktop/windows-fork-own-purposes.png new file mode 100644 index 000000000000..9b93989bde37 Binary files /dev/null and b/assets/images/help/desktop/windows-fork-own-purposes.png differ diff --git a/assets/images/help/desktop/windows-forking-continue.png b/assets/images/help/desktop/windows-forking-continue.png new file mode 100644 index 000000000000..f38169c330ea Binary files /dev/null and b/assets/images/help/desktop/windows-forking-continue.png differ diff --git a/assets/images/help/desktop/windows-repository-settings.png b/assets/images/help/desktop/windows-repository-settings.png new file mode 100644 index 000000000000..0370daacd96a Binary files /dev/null and b/assets/images/help/desktop/windows-repository-settings.png differ diff --git a/content/desktop/contributing-and-collaborating-using-github-desktop/cloning-and-forking-repositories-from-github-desktop.md b/content/desktop/contributing-and-collaborating-using-github-desktop/cloning-and-forking-repositories-from-github-desktop.md index 4055f18d1967..3890e3c0f601 100644 --- a/content/desktop/contributing-and-collaborating-using-github-desktop/cloning-and-forking-repositories-from-github-desktop.md +++ b/content/desktop/contributing-and-collaborating-using-github-desktop/cloning-and-forking-repositories-from-github-desktop.md @@ -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) - -{% endmac %} +{% data reusables.desktop.cloning-repository-list %} +{% data reusables.desktop.choose-local-path %} +{% data reusables.desktop.click-clone %} -{% 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) - -{% endwindows %} - -### 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)." - -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) +{% data reusables.desktop.cloning-repository-list %} +{% data reusables.desktop.choose-local-path %} +{% data reusables.desktop.click-clone %} +{% data reusables.desktop.fork-type-prompt %} + +### Managing fork behavior +You can change how a fork behaves with the upstream repository in {% data variables.product.prodname_desktop %}. + +{% data reusables.desktop.open-repository-settings %} +{% data reusables.desktop.select-fork-behavior %} + +### Further reading +- [About remote repositories](/github/using-git/about-remote-repositories) diff --git a/data/reusables/desktop/choose-clone-repository.md b/data/reusables/desktop/choose-clone-repository.md index 45deab6ea4be..41f4b6a914d4 100644 --- a/data/reusables/desktop/choose-clone-repository.md +++ b/data/reusables/desktop/choose-clone-repository.md @@ -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 %} diff --git a/data/reusables/desktop/choose-local-path.md b/data/reusables/desktop/choose-local-path.md new file mode 100644 index 000000000000..8bf8a7ac5fd9 --- /dev/null +++ b/data/reusables/desktop/choose-local-path.md @@ -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 %} diff --git a/data/reusables/desktop/click-clone.md b/data/reusables/desktop/click-clone.md new file mode 100644 index 000000000000..d291246ebf06 --- /dev/null +++ b/data/reusables/desktop/click-clone.md @@ -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 %} + \ No newline at end of file diff --git a/data/reusables/desktop/cloning-location-tab.md b/data/reusables/desktop/cloning-location-tab.md index 8752592c0ed7..b7a0917ff41f 100644 --- a/data/reusables/desktop/cloning-location-tab.md +++ b/data/reusables/desktop/cloning-location-tab.md @@ -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 %} diff --git a/data/reusables/desktop/cloning-repository-list.md b/data/reusables/desktop/cloning-repository-list.md index 37d26e30394e..925f336eca4b 100644 --- a/data/reusables/desktop/cloning-repository-list.md +++ b/data/reusables/desktop/cloning-repository-list.md @@ -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 %} \ No newline at end of file diff --git a/data/reusables/desktop/fork-type-prompt.md b/data/reusables/desktop/fork-type-prompt.md new file mode 100644 index 000000000000..1067dab7488e --- /dev/null +++ b/data/reusables/desktop/fork-type-prompt.md @@ -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 %} + \ No newline at end of file diff --git a/data/reusables/desktop/open-repository-settings.md b/data/reusables/desktop/open-repository-settings.md new file mode 100644 index 000000000000..5e298edc85b6 --- /dev/null +++ b/data/reusables/desktop/open-repository-settings.md @@ -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 %} + \ No newline at end of file diff --git a/data/reusables/desktop/select-fork-behavior.md b/data/reusables/desktop/select-fork-behavior.md new file mode 100644 index 000000000000..05785064e36e --- /dev/null +++ b/data/reusables/desktop/select-fork-behavior.md @@ -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 %} + \ No newline at end of file