Files
tldr/pages.fr/common/git-apply.md
2021-05-01 12:49:31 -04:00

29 lines
801 B
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 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}}`