diff --git a/assets/images/help/desktop/local-config-email.png b/assets/images/help/desktop/local-config-email.png new file mode 100644 index 000000000000..b153c3a2bb15 Binary files /dev/null and b/assets/images/help/desktop/local-config-email.png differ diff --git a/assets/images/help/desktop/local-config-name.png b/assets/images/help/desktop/local-config-name.png new file mode 100644 index 000000000000..10978676b108 Binary files /dev/null and b/assets/images/help/desktop/local-config-name.png differ diff --git a/assets/images/help/desktop/mac-email-git-config.png b/assets/images/help/desktop/mac-email-git-config.png index e3a9b7cc9ecb..80c32d996e29 100644 Binary files a/assets/images/help/desktop/mac-email-git-config.png and b/assets/images/help/desktop/mac-email-git-config.png differ diff --git a/assets/images/help/desktop/mac-name-git-config.png b/assets/images/help/desktop/mac-name-git-config.png index 170fe95d9576..d1baf9c7e6fe 100644 Binary files a/assets/images/help/desktop/mac-name-git-config.png and b/assets/images/help/desktop/mac-name-git-config.png differ diff --git a/assets/images/help/desktop/mac-save-git-config.png b/assets/images/help/desktop/mac-save-git-config.png index e1c51f45d792..7c97630d7938 100644 Binary files a/assets/images/help/desktop/mac-save-git-config.png and b/assets/images/help/desktop/mac-save-git-config.png differ diff --git a/assets/images/help/desktop/mac-select-default-branch-name.png b/assets/images/help/desktop/mac-select-default-branch-name.png new file mode 100644 index 000000000000..51c05532f806 Binary files /dev/null and b/assets/images/help/desktop/mac-select-default-branch-name.png differ diff --git a/assets/images/help/desktop/repository-settings-git-config-save.png b/assets/images/help/desktop/repository-settings-git-config-save.png new file mode 100644 index 000000000000..49c712d3c65c Binary files /dev/null and b/assets/images/help/desktop/repository-settings-git-config-save.png differ diff --git a/assets/images/help/desktop/repository-settings-remote.png b/assets/images/help/desktop/repository-settings-remote.png new file mode 100644 index 000000000000..56bc7d89a5ba Binary files /dev/null and b/assets/images/help/desktop/repository-settings-remote.png differ diff --git a/assets/images/help/desktop/repository-settings-save.png b/assets/images/help/desktop/repository-settings-save.png new file mode 100644 index 000000000000..e0ae08a71d46 Binary files /dev/null and b/assets/images/help/desktop/repository-settings-save.png differ diff --git a/assets/images/help/desktop/select-git-config.png b/assets/images/help/desktop/select-git-config.png new file mode 100644 index 000000000000..a31fcd9e769b Binary files /dev/null and b/assets/images/help/desktop/select-git-config.png differ diff --git a/assets/images/help/desktop/use-local-git-config.png b/assets/images/help/desktop/use-local-git-config.png new file mode 100644 index 000000000000..ec6b53c6e256 Binary files /dev/null and b/assets/images/help/desktop/use-local-git-config.png differ diff --git a/assets/images/help/desktop/windows-email-git-config.png b/assets/images/help/desktop/windows-email-git-config.png index cdc27f4bb83c..5becfbf9baa9 100644 Binary files a/assets/images/help/desktop/windows-email-git-config.png and b/assets/images/help/desktop/windows-email-git-config.png differ diff --git a/assets/images/help/desktop/windows-name-git-config.png b/assets/images/help/desktop/windows-name-git-config.png index 62272f1397ae..808451bf1c56 100644 Binary files a/assets/images/help/desktop/windows-name-git-config.png and b/assets/images/help/desktop/windows-name-git-config.png differ diff --git a/assets/images/help/desktop/windows-save-git-config.png b/assets/images/help/desktop/windows-save-git-config.png index 3a4358068d2b..44bc4752238a 100644 Binary files a/assets/images/help/desktop/windows-save-git-config.png and b/assets/images/help/desktop/windows-save-git-config.png differ diff --git a/assets/images/help/desktop/windows-select-default-branch-name.png b/assets/images/help/desktop/windows-select-default-branch-name.png new file mode 100644 index 000000000000..22ef710a5e9b Binary files /dev/null and b/assets/images/help/desktop/windows-select-default-branch-name.png differ diff --git a/content/desktop/contributing-and-collaborating-using-github-desktop/working-with-your-remote-repository-on-github-or-github-enterprise/changing-a-remotes-url-from-github-desktop.md b/content/desktop/contributing-and-collaborating-using-github-desktop/working-with-your-remote-repository-on-github-or-github-enterprise/changing-a-remotes-url-from-github-desktop.md index 288dfcf379a0..46d158ab23bb 100644 --- a/content/desktop/contributing-and-collaborating-using-github-desktop/working-with-your-remote-repository-on-github-or-github-enterprise/changing-a-remotes-url-from-github-desktop.md +++ b/content/desktop/contributing-and-collaborating-using-github-desktop/working-with-your-remote-repository-on-github-or-github-enterprise/changing-a-remotes-url-from-github-desktop.md @@ -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. Click **Remote**, and, under **Primary remote repository**, type the desired URL. +![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. Click **Remote**, and, under **Primary remote repository**, type the desired URL. +![Primary remote repository field](/assets/images/help/desktop/repository-settings-remote.png) +{% data reusables.desktop.repository-settings-save %} {% endwindows %} diff --git a/content/desktop/installing-and-configuring-github-desktop/configuring-and-customizing-github-desktop/configuring-git-for-github-desktop.md b/content/desktop/installing-and-configuring-github-desktop/configuring-and-customizing-github-desktop/configuring-git-for-github-desktop.md index 8fb1742971b2..7c668da0555c 100644 --- a/content/desktop/installing-and-configuring-github-desktop/configuring-and-customizing-github-desktop/configuring-git-for-github-desktop.md +++ b/content/desktop/installing-and-configuring-github-desktop/configuring-and-customizing-github-desktop/configuring-git-for-github-desktop.md @@ -1,16 +1,22 @@ --- 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 %} @@ -18,20 +24,19 @@ versions: {% 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 %}. + {% 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) @@ -39,24 +44,75 @@ versions: {% 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 %} +## 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**. + ![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, to enter a custom name, select "Other...". + ![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/repository-settings-git-config-save.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/repository-settings-git-config-save.png) + +{% 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)" diff --git a/data/reusables/desktop/local-config-email.md b/data/reusables/desktop/local-config-email.md new file mode 100644 index 000000000000..b8949d83a005 --- /dev/null +++ b/data/reusables/desktop/local-config-email.md @@ -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. + ![The name field of the local Git configuration](/assets/images/help/desktop/local-config-email.png) diff --git a/data/reusables/desktop/local-config-name.md b/data/reusables/desktop/local-config-name.md new file mode 100644 index 000000000000..9d5feeb04cc7 --- /dev/null +++ b/data/reusables/desktop/local-config-name.md @@ -0,0 +1,2 @@ +1. Under **Name**, type the name you'd like to use for your local Git configuration. + ![The name field of the local Git configuration](/assets/images/help/desktop/local-config-name.png) diff --git a/data/reusables/desktop/mac-repository-settings-menu.md b/data/reusables/desktop/mac-repository-settings-menu.md new file mode 100644 index 000000000000..a7d1cbbcb6f2 --- /dev/null +++ b/data/reusables/desktop/mac-repository-settings-menu.md @@ -0,0 +1,2 @@ +1. In the **Repository** menu, click **Repository Settings...**. +![Repository Settings menu option](/assets/images/help/desktop/repository-settings-mac.png) diff --git a/data/reusables/desktop/paste-email-git-config.md b/data/reusables/desktop/paste-email-git-config.md deleted file mode 100644 index f13ef1f91697..000000000000 --- a/data/reusables/desktop/paste-email-git-config.md +++ /dev/null @@ -1 +0,0 @@ -1. In the **Email** field, paste the email address you copied from your {% data variables.product.prodname_dotcom %} or {% data variables.product.prodname_enterprise %} account settings. diff --git a/data/reusables/desktop/repository-settings-save.md b/data/reusables/desktop/repository-settings-save.md new file mode 100644 index 000000000000..e2f000c5fe09 --- /dev/null +++ b/data/reusables/desktop/repository-settings-save.md @@ -0,0 +1,2 @@ +1. Click **Save**. + ![The Save button](/assets/images/help/desktop/repository-settings-save.png) diff --git a/data/reusables/desktop/select-email-git-config.md b/data/reusables/desktop/select-email-git-config.md new file mode 100644 index 000000000000..d99e660ca7e4 --- /dev/null +++ b/data/reusables/desktop/select-email-git-config.md @@ -0,0 +1 @@ +1. Select the **Email** dropdown and click the email address you would like to use for your commits. diff --git a/data/reusables/desktop/select-git-config.md b/data/reusables/desktop/select-git-config.md new file mode 100644 index 000000000000..a21b65b1c5e2 --- /dev/null +++ b/data/reusables/desktop/select-git-config.md @@ -0,0 +1,2 @@ +1. Click **Git Config**. +![Git Config option](/assets/images/help/desktop/select-git-config.png) diff --git a/data/reusables/desktop/use-local-git-config.md b/data/reusables/desktop/use-local-git-config.md new file mode 100644 index 000000000000..054a873cb112 --- /dev/null +++ b/data/reusables/desktop/use-local-git-config.md @@ -0,0 +1,2 @@ +1. Under "For this repository I wish to", select **Use a local Git config**. +![Primary remote repository field](/assets/images/help/desktop/use-local-git-config.png) diff --git a/data/reusables/desktop/windows-repository-settings-menu.md b/data/reusables/desktop/windows-repository-settings-menu.md new file mode 100644 index 000000000000..092d6ebb9c64 --- /dev/null +++ b/data/reusables/desktop/windows-repository-settings-menu.md @@ -0,0 +1,2 @@ +1. In the **Repository** menu, click **Repository settings...**. +![Repository settings menu option](/assets/images/help/desktop/repository-settings-win.png)