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

Update "Configuring Git for GitHub Desktop" article #18146

Merged
merged 25 commits into from
Jun 3, 2022
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
e9ca776
Remove steps that are no longer needed
steveward May 12, 2022
691f8e8
Rename reusable and update
steveward May 12, 2022
717d0ba
Update and add screenshots
steveward May 17, 2022
813ea07
Get started on updating configuring Git details
steveward May 13, 2022
567c6ff
Fix image links
steveward May 24, 2022
92021c0
Merge branch 'main' into desktop-configuring-git
steveward May 24, 2022
6478d47
Add reusables and screenshots for local repository config
steveward May 24, 2022
dd655cf
Update changing remote article with new screenshots and reusables
steveward May 24, 2022
953b64d
Merge branch 'desktop-configuring-git' of https://github.com/github/d…
steveward May 24, 2022
15fa901
Add missing screenshots
steveward May 24, 2022
a2c1c64
Specify local vs global
steveward May 24, 2022
f1e8abf
Move images to correct dir
steveward May 24, 2022
70b031c
Update configuring-git-for-github-desktop.md
steveward May 24, 2022
b5c8055
Update wording in intro and about
steveward May 26, 2022
960e67b
Merge branch 'main' into desktop-configuring-git
steveward May 26, 2022
4d88a1d
Fix screenshot
steveward May 26, 2022
6a495b8
Merge branch 'desktop-configuring-git' of https://github.com/github/d…
steveward May 26, 2022
0512a6c
Add suggestions from review
steveward Jun 2, 2022
48d4f18
Add suggested paragraph and intro sentence
steveward Jun 2, 2022
5a05511
Merge branch 'main' into desktop-configuring-git
steveward Jun 2, 2022
089e0d6
Update content/desktop/contributing-and-collaborating-using-github-de…
steveward Jun 3, 2022
b1cc5fc
Update content/desktop/installing-and-configuring-github-desktop/conf…
steveward Jun 3, 2022
7603c35
Merge branch 'main' into desktop-configuring-git
steveward Jun 3, 2022
032946d
Merge branch 'main' into desktop-configuring-git
steveward Jun 3, 2022
6fe6fe7
Merge branch 'main' into desktop-configuring-git
lecoursen Jun 3, 2022
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.
Binary file added assets/images/help/desktop/local-config-name.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/help/desktop/mac-email-git-config.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/help/desktop/mac-name-git-config.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/help/desktop/mac-save-git-config.png
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.
Binary file added assets/images/help/desktop/select-git-config.png
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.
Binary file modified assets/images/help/desktop/windows-email-git-config.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/help/desktop/windows-name-git-config.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/help/desktop/windows-save-git-config.png
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 @@ -11,22 +11,18 @@ shortTitle: Change a remote's URL
---
{% mac %}

1. In the **Repository** menu, click **Repository Settings...**.
![Repository Settings menu option](/assets/images/help/desktop/repository-settings-mac.png)
2. In the **Primary remote repository** field, type the desired URL.
![Primary remote repository field](/assets/images/help/desktop/repository-settings-remote-mac.png)
3. Click **Save**.
![The Save button](/assets/images/help/desktop/repository-settings-save-mac.png)
{% data reusables.desktop.mac-repository-settings-menu %}
2. Select **Remote**, and in the **Primary remote repository** field, type the desired URL.
steveward marked this conversation as resolved.
Show resolved Hide resolved
![Primary remote repository field](/assets/images/help/desktop/repository-settings-remote.png)
{% data reusables.desktop.repository-settings-save %}

{% endmac %}

{% windows %}

1. In the **Repository** menu, click **Repository settings...**.
![Repository settings menu option](/assets/images/help/desktop/repository-settings-win.png)
2. In the **Primary remote repository** field, type the desired URL.
![Primary remote repository field](/assets/images/help/desktop/repository-settings-remote-win.png)
3. Click **Save**.
![The Save button](/assets/images/help/desktop/repository-settings-save-win.png)
{% data reusables.desktop.windows-repository-settings-menu %}
2. Select **Remote**, and in the **Primary remote repository** field, type the desired URL.
steveward marked this conversation as resolved.
Show resolved Hide resolved
![Primary remote repository field](/assets/images/help/desktop/repository-settings-remote.png)
{% data reusables.desktop.repository-settings-save %}

{% endwindows %}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ redirect_from:
versions:
fpt: '*'
---
{% data variables.product.prodname_desktop %} uses the email address you set in your local Git configuration to connect commits with your account on {% data variables.product.product_name %}.
## About configuring Git
steveward marked this conversation as resolved.
Show resolved Hide resolved

steveward marked this conversation as resolved.
Show resolved Hide resolved
{% data variables.product.prodname_desktop %} allows you to set the name and email you would like associated with your commits. You can also choose the default branch you would like used when creating new repositories in {% data variables.product.prodname_desktop %}.

{% data variables.product.prodname_desktop %} uses the email address you set in your local Git configuration to connect commits with your account on {% data variables.product.product_name %}. When logged in to your {% data variables.product.product_name %} account the

{% data variables.product.prodname_desktop %} will automatically detect if the email address being used does not match an email address associated with your current user.

{% data reusables.desktop.update-email-address %}

Expand All @@ -18,39 +24,86 @@ versions:

{% endtip %}

## Configuring your commit details
steveward marked this conversation as resolved.
Show resolved Hide resolved

steveward marked this conversation as resolved.
Show resolved Hide resolved
{% mac %}

{% data reusables.desktop.sign-in-choose-product %}
{% data reusables.user-settings.access_settings %}
{% data reusables.user-settings.emails %}
{% data reusables.desktop.copy-email-git-config %}
{% data reusables.desktop.return-to-desktop %}
{% data reusables.desktop.mac-select-desktop-menu %}
7. In the Preferences window, click **Git**.
![The Git Pane in the Preferences menu](/assets/images/help/desktop/mac-select-git-pane.png)
{% data reusables.desktop.name-field-git-config %}
![The name field of the Git configuration](/assets/images/help/desktop/mac-name-git-config.png)
{% data reusables.desktop.paste-email-git-config %}
![Pasted email address in Git configuration field](/assets/images/help/desktop/mac-email-git-config.png)
{% data reusables.desktop.select-email-git-config %}
![Select email address in Git configuration field](/assets/images/help/desktop/mac-email-git-config.png)
{% data reusables.desktop.click-save-git-config %}
![Save button in Git configuration field](/assets/images/help/desktop/mac-save-git-config.png)

{% endmac %}

{% windows %}

{% data reusables.desktop.sign-in-choose-product %}
{% data reusables.user-settings.access_settings %}
{% data reusables.user-settings.emails %}
{% data reusables.desktop.copy-email-git-config %}
{% data reusables.desktop.return-to-desktop %}
{% data reusables.desktop.windows-choose-options %}
8. In the Options window, click **Git**.
![The Git Pane in the Options menu](/assets/images/help/desktop/windows-select-git-pane.png)
{% data reusables.desktop.name-field-git-config %}
![The name field of the Git configuration](/assets/images/help/desktop/windows-name-git-config.png)
{% data reusables.desktop.paste-email-git-config %}
![Pasted email address in Git configuration field](/assets/images/help/desktop/windows-email-git-config.png)
{% data reusables.desktop.select-email-git-config %}
![Select email address in Git configuration field](/assets/images/help/desktop/windows-email-git-config.png)
{% data reusables.desktop.click-save-git-config %}
![Save button in Git configuration field](/assets/images/help/desktop/windows-save-git-config.png)

{% endwindows %}

## Overriding the email address GitHub Desktop uses for a repository
steveward marked this conversation as resolved.
Show resolved Hide resolved

In {% data variables.product.prodname_desktop %} you can change the name and email address used for commits in a specific repository. This local Git configuration will override your global Git configuration settings in this one repository, but will not affect any other repositories.
steveward marked this conversation as resolved.
Show resolved Hide resolved

{% mac %}

{% data reusables.desktop.mac-repository-settings-menu %}
{% data reusables.desktop.select-git-config %}
{% data reusables.desktop.use-local-git-config %}
{% data reusables.desktop.local-config-name %}
{% data reusables.desktop.local-config-email %}
{% data reusables.desktop.repository-settings-save %}

{% endmac %}

{% windows %}

{% data reusables.desktop.windows-repository-settings-menu %}
{% data reusables.desktop.select-git-config %}
{% data reusables.desktop.use-local-git-config %}
{% data reusables.desktop.local-config-name %}
{% data reusables.desktop.local-config-email %}
{% data reusables.desktop.repository-settings-save %}

{% endwindows %}


## Configuring your default branch for new repositories

You can configure the default branch that will be used when creating a new repository in {% data variables.product.prodname_desktop %}. The default branch is the base branch for pull requests and code commits. For more information about the default branch, see "[About the default branch](/github/collaborating-with-issues-and-pull-requests/about-branches#about-the-default-branch)."
steveward marked this conversation as resolved.
Show resolved Hide resolved

{% mac %}

{% data reusables.desktop.mac-select-desktop-menu %}
1. In the Preferences window, click **Git**.
![The Git Pane in the Preferences menu](/assets/images/help/desktop/mac-select-git-pane.png)
1. Under "Default branch name for new repositories", select the default branch name you would like to use, or select "Other..." to enter a custom name.
steveward marked this conversation as resolved.
Show resolved Hide resolved
![Default branch name selection options](/assets/images/help/desktop/mac-select-default-branch-name.png)
{% data reusables.desktop.click-save-git-config %}
![Save button in Git configuration field](/assets/images/help/desktop/mac-save-git-config.png)

{% endmac %}

{% windows %}

{% data reusables.desktop.windows-choose-options %}
1. In the Options window, click **Git**.
![The Git Pane in the Options menu](/assets/images/help/desktop/windows-select-git-pane.png)
1. Under "Default branch name for new repositories", select the default branch name you would like to use, or select "Other..." to enter a custom name.
![Default branch name selection options](/assets/images/help/desktop/windows-select-default-branch-name.png)
{% data reusables.desktop.click-save-git-config %}
![Save button in Git configuration field](/assets/images/help/desktop/windows-save-git-config.png)

Expand All @@ -60,3 +113,4 @@ versions:

- "[Adding an email address to your GitHub account](/articles/adding-an-email-address-to-your-github-account/)"
- "[Setting your commit email address](/articles/setting-your-commit-email-address/)"
- "[About branches](/github/collaborating-with-issues-and-pull-requests/about-branches)"
2 changes: 2 additions & 0 deletions data/reusables/desktop/local-config-email.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1. In the **Email** field, select the email you'd like to use for your local Git configuration.
steveward marked this conversation as resolved.
Show resolved Hide resolved
![The name field of the local Git configuration](/assets/images/help/desktop/local-config-email.png)
2 changes: 2 additions & 0 deletions data/reusables/desktop/local-config-name.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1. In the **Name** field, type the name you'd like to use for your local Git configuration.
steveward marked this conversation as resolved.
Show resolved Hide resolved
![The name field of the local Git configuration](/assets/images/help/desktop/local-config-name.png)
2 changes: 2 additions & 0 deletions data/reusables/desktop/mac-repository-settings-menu.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1. In the **Repository** menu, click **Repository Settings...**.
![Repository Settings menu option](/assets/images/help/desktop/repository-settings-mac.png)
1 change: 0 additions & 1 deletion data/reusables/desktop/paste-email-git-config.md

This file was deleted.

2 changes: 2 additions & 0 deletions data/reusables/desktop/repository-settings-save.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1. Click **Save**.
![The Save button](/assets/images/help/desktop/repository-settings-save.png)
1 change: 1 addition & 0 deletions data/reusables/desktop/select-email-git-config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1. In the **Email** dropdown, select the email address you would like to use for your commits.
steveward marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 2 additions & 0 deletions data/reusables/desktop/select-git-config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1. Select **Git Config**.
steveward marked this conversation as resolved.
Show resolved Hide resolved
![Git Config option](/assets/images/help/desktop/select-git-config.png)
2 changes: 2 additions & 0 deletions data/reusables/desktop/use-local-git-config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1. Click **Use a local Git config**.
steveward marked this conversation as resolved.
Show resolved Hide resolved
![Primary remote repository field](/assets/images/help/desktop/use-local-git-config.png)
2 changes: 2 additions & 0 deletions data/reusables/desktop/windows-repository-settings-menu.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1. In the **Repository** menu, click **Repository settings...**.
![Repository settings menu option](/assets/images/help/desktop/repository-settings-win.png)