About Git configuration for GitHub Desktop
GitHub 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.
GitHub 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, GitHub Desktop will detect and use those values. GitHub 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 GitHub account you are currently logged in to, GitHub Desktop will show a warning prior to committing.
GitHub Desktop also allows you to change the default branch name that you would like to use when creating new repositories. By default, GitHub Desktop uses main
as the default branch name in any new repositories you create.
Tip: Anyone will be able to see the email address in your Git configuration if you make public commits. For more information, see "E-Mail-Adresse für Commits festlegen."
Configuring your global author information
Configuring your global author information in GitHub 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 GitHub Desktop.
-
Wähle in der Menüleiste GitHub Desktop aus, und klicke dann auf Einstellungen.
-
Klicke im Fenster „Einstellungen“ auf Git.
-
Gib im Feld Name den Namen ein, den du für deine Git-Konfiguration verwenden möchtest.
-
Wähle im Dropdownmenü „E-Mail“ die E-Mail-Adresse aus, die du für deine Commits verwenden möchtest. Du kannst eine E-Mail-Adresse auswählen, die deinem GitHub-Konto zugeordnet ist. Wähle alternativ „Sonstige“ aus, und gib eine andere E-Mail-Adresse ein.
-
Klicken Sie auf Speichern.
-
Wähle das Menü Datei aus, und klicke dann auf Optionen.
-
In the "Options" window, click Git.
-
Gib im Feld Name den Namen ein, den du für deine Git-Konfiguration verwenden möchtest.
-
Wähle im Dropdownmenü „E-Mail“ die E-Mail-Adresse aus, die du für deine Commits verwenden möchtest. Du kannst eine E-Mail-Adresse auswählen, die deinem GitHub-Konto zugeordnet ist. Wähle alternativ „Sonstige“ aus, und gib eine andere E-Mail-Adresse ein.
-
Klicken Sie auf Speichern.
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.
-
To switch to the repository for which you want to set specific configuration, use the "Current Repository" dropdown menu.
-
Wähle in der Menüleiste von GitHub Desktop die Option Repository aus, und klicke auf Repositoryeinstellungen... .
-
Klicke im Fenster „Repositoryeinstellungen“ in der linken Seitenleiste auf Git-Konfiguration.
-
Wähle unter „Für dieses Repository möchte ich“ die Option Lokale Git-Konfiguration verwenden aus.
-
Gib im Feld Name den Namen ein, den du für deine lokale Git-Konfiguration verwenden möchtest.
-
Wähle im Dropdownmenü „E-Mail“ die E-Mail-Adresse aus, die du für deine Commits verwenden möchtest. Du kannst eine E-Mail-Adresse auswählen, die deinem GitHub-Konto zugeordnet ist. Wähle alternativ „Sonstige“ aus, und gib eine andere E-Mail-Adresse ein.
-
Klicken Sie auf Speichern.
-
Öffne das Menü Repository, und klicke dann auf Repositoryeinstellungen... .
-
Klicke im Fenster „Repositoryeinstellungen“ in der linken Seitenleiste auf Git-Konfiguration.
-
Wähle unter „Für dieses Repository möchte ich“ die Option Lokale Git-Konfiguration verwenden aus.
-
Gib im Feld Name den Namen ein, den du für deine lokale Git-Konfiguration verwenden möchtest.
-
Wähle im Dropdownmenü „E-Mail“ die E-Mail-Adresse aus, die du für deine Commits verwenden möchtest. Du kannst eine E-Mail-Adresse auswählen, die deinem GitHub-Konto zugeordnet ist. Wähle alternativ „Sonstige“ aus, und gib eine andere E-Mail-Adresse ein.
-
Klicken Sie auf Speichern.
Configuring your default branch for new repositories
You can configure the default branch that will be used when you create a new repository in GitHub Desktop. For more information about the default branch, see "Informationen zu Branches."
-
Wähle in der Menüleiste GitHub Desktop aus, und klicke dann auf Einstellungen.
-
Klicke im Fenster „Einstellungen“ auf Git.
-
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...".
-
Klicken Sie auf Speichern.
-
Wähle das Menü Datei aus, und klicke dann auf Optionen.
-
In the Options window, click Git.
-
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...".
-
Klicken Sie auf Speichern.