1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-22 13:42:07 +02:00
tldr/pages.fr/common/git-apply.md
2021-05-01 12:49:31 -04:00

801 B

git apply

Applique un correctif à un fichier et/ou à l index. Plus d'informations : https://git-scm.com/docs/git-apply.

  • Afficher les messages à propos des fichiers corrigés :

git apply --verbose {{chemin/vers/fichier}}

  • Applique le correctif et ajoute les fichiers à l index :

git apply --index {{chemin/vers/fichier}}

  • Applique un correctif depuis une source distante :

curl {{https://example.com/file.patch}} | git apply

  • Affiche les différences résultantes et applique le correctif :

git apply --stat --apply {{chemin/vers/fichier}}

  • Applique le correctif en ordre inverse :

git apply --reverse {{chemin/vers/fichier}}

  • Stocke le résultat du correctif dans l'index sans modifier la branche courante :

git apply --cache {{chemin/vers/fichier}}