Skip to main content

Cette version de GitHub Enterprise Server ne sera plus disponible le 2026-08-25. Les versions abandonnées ne sont pas prises en charge. 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 dans GitHub Enterprise Server, consultez Overview du processus de mise à niveau. Pour obtenir de l’aide sur la mise à niveau, GitHub Support Entreprise.

Committing changes to a pull request branch created from a fork

Commit changes to a pull request branch created from a fork by obtaining the necessary permissions and using Git commands effectively.

To commit to a pull request branch created from a fork, you need push access to the base repository, permission from the pull request creator, and a user-owned fork without branch restrictions that prevent your push. Only the pull request creator can allow edits to their fork. See Allowing changes to a pull request branch created from a fork.

  1. On GitHub, navigate to the fork where the pull request branch was created.

  2. Au-dessus de la liste de fichiers, cliquez sur Code.

    Capture d’écran de la liste des fichiers dans la page d’accueil d’un dépôt. Le bouton « Code » est mis en évidence avec un encadré orange foncé.

  3. Copiez l’URL du dépôt.

    • Pour cloner le référentiel en utilisant HTTPS, sous « HTTPS », cliquez sur .

    • Pour cloner le dépôt avec une clé SSH, en incluant un certificat émis par l’autorité de certification SSH de votre organisation, cliquez sur SSH et sur .

    • Pour cloner un dépôt avec l’GitHub CLI, cliquez sur GitHub CLI et sur .

      Capture d’écran du menu déroulant « Code ». À droite de l’URL HTTPS du dépôt, une icône de copie est indiquée en orange foncé.

  4. Open your terminal or Git Bash.

  5. Change the current working directory to the location where you want to clone the fork.

    cd open-source-projects
    
  6. Clone the fork, then navigate into the cloned repository.

    git clone https://HOSTNAME/USERNAME/FORK-OF-THE-REPOSITORY
    cd FORK-OF-THE-REPOSITORY
    
  7. Check out the pull request's compare branch. To find the compare branch, open the pull request and check the branch shown at the top of the page.

    git checkout TEST-BRANCH
    
  8. Make your changes, then stage and commit them.

    git add .
    git commit -m "YOUR-COMMIT-MESSAGE"
    
  9. Push your commit to the pull request branch.

    git push origin TEST-BRANCH
    

Your new commits appear on the original pull request on votre instance GitHub Enterprise Server.

Further reading