{"meta":{"title":"Gestion des erreurs autres que de type avance rapide","intro":"Parfois, Git ne peut pas apporter votre modification à un dépôt distant sans perdre de commit. Quand cela se produit, votre poussée (push) est refusée.","product":"Bien démarrer","breadcrumbs":[{"href":"/fr/get-started","title":"Bien démarrer"},{"href":"/fr/get-started/using-git","title":"Utilisation de Git"},{"href":"/fr/get-started/using-git/dealing-with-non-fast-forward-errors","title":"Erreur de non-avancement rapide"}],"documentType":"article"},"body":"# Gestion des erreurs autres que de type avance rapide\n\nParfois, Git ne peut pas apporter votre modification à un dépôt distant sans perdre de commit. Quand cela se produit, votre poussée (push) est refusée.\n\nSi une autre personne a poussé des modifications vers la même branche que vous, Git ne pourra pas pousser vos modifications.\n\n```shell\n$ git push origin main\n> To https://github.com/USERNAME/REPOSITORY.git\n>  ! [rejected]        main -> main (non-fast-forward)\n> error: failed to push some refs to 'https://github.com/USERNAME/REPOSITORY.git'\n> To prevent you from losing history, non-fast-forward updates were rejected\n> Merge the remote changes (e.g. 'git pull') before pushing again. See the\n> 'Note about fast-forwards' section of 'git push --help' for details.\n```\n\nVous pouvez résoudre ce problème en [extrayant et en fusionnant](/fr/get-started/using-git/getting-changes-from-a-remote-repository) les modifications apportées à la branche distante avec les modifications que vous avez effectuées localement :\n\n```shell\n$ git fetch origin\n# Fetches updates made to an online repository\n$ git merge origin YOUR_BRANCH_NAME\n# Merges updates made online with your local work\n```\n\nVous pouvez aussi simplement utiliser `git pull` pour exécuter les deux commandes à la fois :\n\n```shell\n$ git pull origin YOUR_BRANCH_NAME\n# Grabs online updates and merges them with your local work\n```"}