Skip to main content

Automatically merging a pull request

Enable or disable auto-merge for pull requests to streamline your workflow and automatically merge changes once all requirements are met.

Wer kann dieses Feature verwenden?

Automatische Zusammenführung für Pull Requests ist in öffentlichen Repositorys mit GitHub Free und GitHub Free für Organisationen sowie in öffentlichen und privaten Repositorys mit GitHub Pro, GitHub Team, GitHub Enterprise Cloud und GitHub Enterprise Server verfügbar. Weitere Informationen findest du unter Pläne von GitHub.

In diesem Artikel

About auto-merge

Auto-merge merges a pull request automatically after all required reviews and status checks pass. Before you use auto-merge, it must be enabled for the repository. See Verwalten der automatischen Zusammenführung für Pull Requests in deinem Repository.

Auto-merge is disabled if someone without write permissions pushes new changes to the head branch or switches the base branch.

Enabling auto-merge

Hinweis

Die Option zum Aktivieren automatischer Merges wird nur bei Pull Requests angezeigt, die nicht sofort gemergt werden können. Dies ist beispielsweise der Fall, wenn eine Branchschutzregel Pull Request-Reviews vor dem Mergen erzwingt oder Statusüberprüfungen vor dem Mergen erfolgreich durchgeführt werden müssen und diese Bedingungen noch nicht erfüllt werden. Weitere Informationen finden Sie unter Verwalten einer Branchschutzregel.

People with write permissions to a repository can enable auto-merge for a pull request.

  1. Navigieren Sie auf GitHub zur Hauptseite des Repositorys.

  2. Klicke unter dem Namen deines Repositorys auf Pull requests.

    Screenshot der Hauptseite eines Repositorys. In der horizontalen Navigationsleiste ist eine Registerkarte mit der Bezeichnung „Pull Requests“ dunkelorange umrandet.

  3. In the "Pull Requests" list, click the pull request you want to auto-merge.

  4. Optionally, select the dropdown menu, then click a merge method. See Pull request merges.

    Screenshot of the merge box of a pull request. A dropdown menu, labeled with a downward-facing triangle, is outlined in dark orange.

  5. Click Enable auto-merge.

  6. If you chose the merge or squash and merge methods, type a commit message and description and choose the email address you want to author the merge commit.

    Hinweis

    The email dropdown menu is not available if you have email privacy enabled or if you only have one verified and visible email associated with your GitHub account.

  7. Click Confirm auto-merge.

Disabling auto-merge

People with write permissions to a repository and pull request authors can disable auto-merge for a pull request.

  1. Navigieren Sie auf GitHub zur Hauptseite des Repositorys.

  2. Klicke unter dem Namen deines Repositorys auf Pull requests.

    Screenshot der Hauptseite eines Repositorys. In der horizontalen Navigationsleiste ist eine Registerkarte mit der Bezeichnung „Pull Requests“ dunkelorange umrandet.

  3. In the "Pull Requests" list, click the pull request for which you want to disable auto-merge.

  4. In the merge box, click Disable auto-merge.