-
Notifications
You must be signed in to change notification settings - Fork 62.2k
Update "Configuring Git for GitHub Desktop" article #18146
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
Merged
Merged
Changes from all 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 691f8e8
Rename reusable and update
steveward 717d0ba
Update and add screenshots
steveward 813ea07
Get started on updating configuring Git details
steveward 567c6ff
Fix image links
steveward 92021c0
Merge branch 'main' into desktop-configuring-git
steveward 6478d47
Add reusables and screenshots for local repository config
steveward dd655cf
Update changing remote article with new screenshots and reusables
steveward 953b64d
Merge branch 'desktop-configuring-git' of https://github.com/github/d…
steveward 15fa901
Add missing screenshots
steveward a2c1c64
Specify local vs global
steveward f1e8abf
Move images to correct dir
steveward 70b031c
Update configuring-git-for-github-desktop.md
steveward b5c8055
Update wording in intro and about
steveward 960e67b
Merge branch 'main' into desktop-configuring-git
steveward 4d88a1d
Fix screenshot
steveward 6a495b8
Merge branch 'desktop-configuring-git' of https://github.com/github/d…
steveward 0512a6c
Add suggestions from review
steveward 48d4f18
Add suggested paragraph and intro sentence
steveward 5a05511
Merge branch 'main' into desktop-configuring-git
steveward 089e0d6
Update content/desktop/contributing-and-collaborating-using-github-de…
steveward b1cc5fc
Update content/desktop/installing-and-configuring-github-desktop/conf…
steveward 7603c35
Merge branch 'main' into desktop-configuring-git
steveward 032946d
Merge branch 'main' into desktop-configuring-git
steveward 6fe6fe7
Merge branch 'main' into desktop-configuring-git
lecoursen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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.
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.
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.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
90 changes: 73 additions & 17 deletions
90
...onfiguring-and-customizing-github-desktop/configuring-git-for-github-desktop.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,118 @@ | ||
--- | ||
title: Configuring Git for GitHub Desktop | ||
shortTitle: Configuring Git | ||
intro: 'If you don''t already have Git installed, you must configure it before using GitHub Desktop.' | ||
intro: 'You can manage Git configuration settings for your local repositories with {% data variables.product.prodname_desktop %}.' | ||
redirect_from: | ||
- /desktop/getting-started-with-github-desktop/configuring-git-for-github-desktop | ||
- /desktop/installing-and-configuring-github-desktop/configuring-git-for-github-desktop | ||
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 Git configuration for {% data variables.product.prodname_desktop %} | ||
|
||
{% data reusables.desktop.update-email-address %} | ||
{% data variables.product.prodname_desktop %} uses your local Git configuration settings and provides the option to configure some of these settings, such as the global author information and the default branch that is used when creating a new repository. | ||
|
||
{% data variables.product.prodname_desktop %} allows you to set the name and email address you would like associated with the commits you make in your repositories. If your name and email address have already been set in the global Git configuration for your computer, {% data variables.product.prodname_desktop %} will detect and use those values. {% data variables.product.prodname_desktop %} also allows you to set a different name and email address for an individual repository. This is useful when you need to use a separate work email address for a specific repository. | ||
|
||
If the email address that has been set in your Git configuration does not match an email address associated with the {% data variables.product.product_name %} account you are currently logged in to, {% data variables.product.prodname_desktop %} will show a warning prior to committing. | ||
|
||
{% data variables.product.prodname_desktop %} also allows you to change the default branch name that you would like to use when creating new repositories. By default, {% data variables.product.prodname_desktop %} uses `main` as the default branch name in any new repositories you create. | ||
|
||
{% tip %} | ||
|
||
**Tip**: Anyone will be able to see the email address in your Git configuration if you make public commits. For more information, see "[Setting your commit email address](/articles/setting-your-commit-email-address/)." | ||
|
||
{% endtip %} | ||
|
||
## Configuring your global author information | ||
|
||
Configuring your global author information in {% data variables.product.prodname_desktop %} will update the name and email address in your global Git configuration. This will be the default name and email address for all new local repositories you create in {% data variables.product.prodname_desktop %}. | ||
|
||
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**. | ||
 | ||
{% data reusables.desktop.name-field-git-config %} | ||
 | ||
{% data reusables.desktop.paste-email-git-config %} | ||
 | ||
{% data reusables.desktop.select-email-git-config %} | ||
 | ||
{% data reusables.desktop.click-save-git-config %} | ||
 | ||
|
||
{% 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**. | ||
 | ||
{% data reusables.desktop.name-field-git-config %} | ||
 | ||
{% data reusables.desktop.paste-email-git-config %} | ||
 | ||
{% data reusables.desktop.select-email-git-config %} | ||
 | ||
{% data reusables.desktop.click-save-git-config %} | ||
 | ||
|
||
{% endwindows %} | ||
|
||
## Configuring different author information for an individual repository | ||
|
||
You can change the name and email address used to author commits in a specific repository. This local Git configuration will override your global Git configuration settings for this one repository only. | ||
|
||
{% 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 you create a new repository in {% data variables.product.prodname_desktop %}. 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)." | ||
|
||
{% mac %} | ||
|
||
{% data reusables.desktop.mac-select-desktop-menu %} | ||
1. In the Preferences window, click **Git**. | ||
 | ||
1. Under "Default branch name for new repositories", select the default branch name you would like to use, or, to enter a custom name, select "Other...". | ||
 | ||
{% data reusables.desktop.click-save-git-config %} | ||
 | ||
|
||
{% endmac %} | ||
|
||
{% windows %} | ||
|
||
{% data reusables.desktop.windows-choose-options %} | ||
1. In the Options window, click **Git**. | ||
 | ||
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. | ||
 | ||
{% data reusables.desktop.click-save-git-config %} | ||
 | ||
|
||
{% endwindows %} | ||
|
||
## Further reading | ||
|
||
- "[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)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
1. Under **Email**, select the dropdown menu and click the email you'd like to use for your local Git configuration. | ||
 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
1. Under **Name**, type the name you'd like to use for your local Git configuration. | ||
 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
1. In the **Repository** menu, click **Repository Settings...**. | ||
 |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
1. Click **Save**. | ||
 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1. Select the **Email** dropdown and click the email address you would like to use for your commits. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
1. Click **Git Config**. | ||
 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
1. Under "For this repository I wish to", select **Use a local Git config**. | ||
 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
1. In the **Repository** menu, click **Repository settings...**. | ||
 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.