You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/desktop/adding-and-cloning-repositories/cloning-and-forking-repositories-from-github-desktop.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ You can create a local copy of any repository on {% data variables.product.githu
18
18
19
19
When you clone a repository, any changes you push to {% data variables.product.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 [AUTOTITLE](/pull-requests/collaborating-with-pull-requests/working-with-forks/about-forks).
20
20
21
-
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).
21
+
When you use {% data variables.product.prodname_desktop %} to push a change to a repository that you do not have write access to, {% data variables.product.prodname_desktop %} will prompt you to create a fork. 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).
22
22
23
23
You can also clone a repository directly from {% data variables.product.prodname_dotcom %} or {% data variables.product.prodname_enterprise %}. For more information, see [AUTOTITLE](/desktop/adding-and-cloning-repositories/cloning-a-repository-from-github-to-github-desktop).
Copy file name to clipboardExpand all lines: content/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo.md
+6-12
Original file line number
Diff line number
Diff line change
@@ -95,12 +95,12 @@ You can fork a repository on {% data variables.product.prodname_dotcom_the_websi
95
95
96
96
{% enddesktop %}
97
97
98
+
{% webui %}
99
+
98
100
## Cloning your forked repository
99
101
100
102
Right now, you have a fork of the Spoon-Knife repository, but you do not have the files in that repository locally on your computer.
101
103
102
-
{% webui %}
103
-
104
104
1. On {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.location.product_location %}{% endif %}, navigate to **your fork** of the Spoon-Knife repository.
105
105
{% data reusables.repositories.copy-clone-url %}
106
106
{% data reusables.command_line.open_the_multi_os_terminal %}
@@ -126,6 +126,10 @@ Right now, you have a fork of the Spoon-Knife repository, but you do not have th
126
126
127
127
{% cli %}
128
128
129
+
## Cloning your forked repository
130
+
131
+
Right now, you have a fork of the Spoon-Knife repository, but you do not have the files in that repository locally on your computer.
132
+
129
133
{% data reusables.cli.cli-learn-more %}
130
134
131
135
To create a clone of your fork, use the `--clone` flag.
{% data reusables.desktop.choose-clone-repository %}
142
-
{% data reusables.desktop.cloning-location-tab %}
143
-
{% data reusables.desktop.cloning-repository-list %}
144
-
{% data reusables.desktop.choose-local-path %}
145
-
{% data reusables.desktop.click-clone %}
146
-
147
-
{% enddesktop %}
148
-
149
143
## Configuring Git to sync your fork with the upstream repository
150
144
151
145
When you fork a project in order to propose changes to the upstream repository, you can configure Git to pull changes from the upstream repository into the local clone of your fork.
1. To select the local directory into which you want to clone the repository, next to the "Local Path" field, click **Choose...** and navigate to the directory.
2
+
3
+

1. Click the tab that corresponds to the location of the repository you want to clone. In this example, we click on the URL tab.
2
+
3
+

1. Enter the url or path of the repository you want to clone.
2
+
3
+

1. To create a fork, attempt to push a change to the repository. For example, create a new branch and publish it. A prompt will appear asking if you want to fork this repository.
2
+
3
+

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.
1
+
In {% data variables.product.prodname_desktop %}, if you clone a repository that you do not have write access to, and then attempt to push a change to the repository, a fork will be created for you.
2
2
3
3
{% data reusables.desktop.choose-clone-repository %}
4
-
{% data reusables.desktop.cloning-location-tab %}
5
-
{% data reusables.desktop.cloning-repository-list %}
6
-
{% data reusables.desktop.choose-local-path %}
4
+
{% data reusables.desktop.cloning-location-url-tab %}
5
+
{% data reusables.desktop.cloning-repository-url %}
6
+
{% data reusables.desktop.choose-local-path-url-tab %}
0 commit comments