Skip to main content

Cette version de GitHub Enterprise Server n'est plus disponible depuis le 2024-09-25. Aucune publication de correctifs n’est effectuée, même pour les problèmes de sécurité critiques. Pour de meilleures performances, une sécurité améliorée et de nouvelles fonctionnalités, effectuez une mise à niveau vers la dernière version de GitHub Enterprise. Pour obtenir de l’aide sur la mise à niveau, contactez le support GitHub Enterprise.

Création d’une branche pour travailler sur un problème

Vous pouvez créer une branche pour travailler sur un problème directement à partir de la page de problème et commencer immédiatement.

Note: The ability to create a branch for an issue is currently in beta and subject to change.

About branches connected to an issue

Branches connected to an issue are shown under the "Development" section in the sidebar of an issue. When you create a pull request for one of these branches, it is automatically linked to the issue. The connection with that branch is removed and only the pull request is shown in the "Development" section. For more information, see "Linking a pull request to an issue."

Creating a branch for an issue

Anyone with write permission to a repository can create a branch for an issue. You can link multiple branches for an issue.

By default, the new branch is created in the current repository, and from the default branch.

  1. On GitHub, navigate to the main page of the repository.

  2. Under your repository name, click Issues.

    Screenshot of the main page of a repository. In the horizontal navigation bar, a tab, labeled "Issues," is outlined in dark orange.

  3. In the list of issues, click the issue that you would like to create a branch for.

  4. In the right sidebar under "Development", click Create a branch. If the issue already has a linked branch or pull request, select and click Create a branch.

    Screenshot of the issue sidebar. In the "Development" section, a link, labeled "Create a branch", is outlined in dark orange.

  5. Optionally, in the "Branch name" field, type a branch name.

  6. Optionally, select the Repository destination dropdown menu, then choose a repository.

  7. Under "What's next", select whether you want to work on the branch locally or to open the branch in GitHub Desktop.

  8. Click Create branch.