Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated GitHub desktop fork instructions #36172

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
aa53d42
update cloning-and-forking-repositories-from-github-desktop docs to m…
Nikkitory Jul 31, 2024
e40e90e
remove now redundant section of fork-a-repo.md
Nikkitory Jul 31, 2024
27435e3
revert changes to image-density.txt
Nikkitory Jul 31, 2024
390ad6f
revert deletion of clone-a-repository-list-mac.png
Nikkitory Jul 31, 2024
9c7328b
Merge branch 'main' into update-github-desktop-fork-instructions
Nikkitory Jul 31, 2024
895fc4d
Merge branch 'main' into update-github-desktop-fork-instructions
steveward Aug 12, 2024
e2b82a3
Merge remote-tracking branch 'origin/main' into updated-github-deskto…
warp-core Jan 22, 2025
a52f843
Rename "choose-repository-location-mac"
warp-core Jan 22, 2025
bcd3f1f
Restore original "choose-repository-location-mac"
warp-core Jan 22, 2025
6a23943
Restore "clone-choose-button-mac" image
warp-core Feb 4, 2025
acf4623
Rename new image to "clone-choose-button-url-windows"
warp-core Feb 4, 2025
317ef94
That's a Windows screenshot
warp-core Feb 4, 2025
bcf2722
Suggestions from code review
warp-core Feb 4, 2025
dbdeef4
Add new images to src/assets/lib/image-density.txt
warp-core Feb 4, 2025
db1b24e
Rename new reusable markdown files
warp-core Feb 4, 2025
2cd173d
Restore original reusable markdowns
warp-core Feb 4, 2025
fc5f49a
Revert "Add new images to src/assets/lib/image-density.txt"
warp-core Feb 4, 2025
586a174
Merge remote-tracking branch 'origin/main' into updated-github-deskto…
warp-core Feb 4, 2025
8c76a79
Fix content linter errors?
warp-core Feb 5, 2025
3184af6
Improve alt-text
warp-core Feb 5, 2025
efc4ed5
Use new reusables in desktop/forking-a-repo reusable doc
warp-core Feb 5, 2025
aef151c
Create alternate reusable to "choose-local-path"
warp-core Feb 5, 2025
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ You can create a local copy of any repository on {% data variables.product.githu

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

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).
When you use {% data variables.product.prodname_desktop %} to push new commits 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).

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ Right now, you have a fork of the Spoon-Knife repository, but you do not have th

{% cli %}

## Cloning your forked repository

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.

{% data reusables.cli.cli-learn-more %}

To create a clone of your fork, use the `--clone` flag.
Expand All @@ -136,16 +140,6 @@ gh repo fork REPOSITORY --clone=true

{% endcli %}

{% desktop %}

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

{% enddesktop %}

## Configuring Git to sync your fork with the upstream repository

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.
Expand Down
3 changes: 3 additions & 0 deletions data/reusables/desktop/choose-local-path-url-tab.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
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.

![Screenshot of the "URL" tab of the "Clone a repository" window. A button, labeled "Choose", is highlighted with an orange outline.](/assets/images/help/desktop/clone-choose-button-url-windows.png)
3 changes: 3 additions & 0 deletions data/reusables/desktop/cloning-location-url-tab.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,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.

![Screenshot of the "Clone a repository" window. At the top of the window, "GitHub.com", "GitHub Enterprise" and "URL" tabs are outlined in orange. The "URL" tab is selected.](/assets/images/help/desktop/choose-repository-location-url-tab-windows.png)

Check warning on line 3 in data/reusables/desktop/cloning-location-url-tab.md

View workflow job for this annotation

GitHub Actions / lint-content

Image alternate text is 172 characters long.
3 changes: 3 additions & 0 deletions data/reusables/desktop/cloning-repository-url.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
1. Enter the url or path of the repository you want to clone.

![Screenshot of the "URL" tab of the "Clone a repository" window. The input containing "octocat/Spoon-Knife" is highlighted with an orange outline.](/assets/images/help/desktop/clone-a-repository-url-tab-name-input.png)
3 changes: 3 additions & 0 deletions data/reusables/desktop/create-fork-prompt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
1. To create a fork, attempt to write 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. Click "Fork this repository"

![Screenshot of the "Create a fork prompt" window. A button, labeled "Fork this repository", is highlighted with an orange outline.](/assets/images/help/desktop/create-fork-button-windows.png)
9 changes: 5 additions & 4 deletions data/reusables/desktop/forking-a-repo.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
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.
In {% data variables.product.prodname_desktop %}, if you clone a repository that you don't have write access to, and then attempt to push new commits to the repository, a fork will be 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.cloning-location-url-tab %}
{% data reusables.desktop.cloning-repository-url %}
{% data reusables.desktop.choose-local-path-url-tab %}
{% data reusables.desktop.click-clone %}
{% data reusables.desktop.create-fork-prompt %}
{% data reusables.desktop.fork-type-prompt %}
Loading