Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,10 @@ You can also clone a repository directly from {% data variables.product.prodname
{% data reusables.desktop.click-clone %}

## 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 %}
{% data reusables.desktop.choose-local-path %}
{% data reusables.desktop.click-clone %}
{% data reusables.desktop.fork-type-prompt %}
You can fork a repository on {% data variables.product.prodname_dotcom_the_website %} or in {% data variables.product.prodname_desktop %}. For information about forking on {% data variables.product.prodname_dotcom_the_website %}, see "[Fork a repo](/get-started/quickstart/fork-a-repo?tool=webui)."

{% data reusables.desktop.forking-a-repo %}

## Managing fork behavior
You can change how a fork behaves with the upstream repository in {% data variables.product.prodname_desktop %}.
Expand Down
7 changes: 6 additions & 1 deletion content/get-started/quickstart/fork-a-repo.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ You might fork a project to propose changes to the upstream repository. In this
![Fork button](/assets/images/help/repository/fork_button.png){% ifversion fpt or ghec or ghes > 3.5 or ghae > 3.5 %}
3. Select an owner for the forked repository.
![Create a new fork page with owner dropdown emphasized](/assets/images/help/repository/fork-choose-owner.png)
4. By default, forks are named the same as their upstream repositories. You can change the name of the fork to distinguish it further.
4. By default, forks are named the same as their upstream repositories. You can change the name of the fork to distinguish it further.
![Create a new fork page with repository name field emphasized](/assets/images/help/repository/fork-choose-repo-name.png)
5. Optionally, add a description of your fork.
![Create a new fork page with description field emphasized](/assets/images/help/repository/fork-description.png)
Expand Down Expand Up @@ -97,6 +97,11 @@ gh repo fork REPOSITORY --org "octo-org"
{% endcli %}

{% desktop %}

You can fork a repository on {% data variables.product.prodname_dotcom_the_website %} or in {% data variables.product.prodname_desktop %}. For information about forking on {% data variables.product.prodname_dotcom_the_website %}, see [the web browser version of this article](/get-started/quickstart/fork-a-repo?tool=webui).

{% data reusables.desktop.forking-a-repo %}

{% enddesktop %}

## Cloning your forked repository
Expand Down
8 changes: 8 additions & 0 deletions data/reusables/desktop/forking-a-repo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
In {% data variables.product.prodname_desktop %}, if you attempt to clone a repository that you don't have write access to, a fork is automatically created for you.

{% data reusables.desktop.choose-clone-repository %}
{% data reusables.desktop.cloning-location-tab %}
{% data reusables.desktop.cloning-repository-list %}
{% data reusables.desktop.choose-local-path %}
{% data reusables.desktop.click-clone %}
{% data reusables.desktop.fork-type-prompt %}