tech:creer_un_patch_-_diff
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
| tech:creer_un_patch_-_diff [2025/03/24 15:06] – créée - modification externe 127.0.0.1 | tech:creer_un_patch_-_diff [2026/06/07 19:12] (Version actuelle) – modification externe 127.0.0.1 | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| + | < | ||
| + | {{tag> | ||
| + | |||
| + | # Créer un patch - diff | ||
| + | |||
| + | Voir aussi : | ||
| + | * JSON RFC 6902 patch | ||
| + | |||
| + | Source: https:// | ||
| + | |||
| + | ~~~bash | ||
| + | diff -Naur standard_moodle my_moodle > patch.txt | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | ## Avec git | ||
| + | |||
| + | The easiest way to create a patch for the last commit is | ||
| + | |||
| + | Créer un patch pour le dernier commit | ||
| + | ~~~bash | ||
| + | git show > patch.txt | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | If you want to create a patch between 2 specific commits you can use git diff | ||
| + | ~~~bash | ||
| + | git diff commitid1 commitid2 > patch.txt | ||
| + | ~~~ | ||
| + | |||
| + | Il existe aussi `git format-patch` pour pouvoir facilement envoyer un patch par mail | ||
| + | ~~~bash | ||
| + | git format-patch -n | ||
| + | #git format-patch -1 < | ||
| + | ~~~ | ||
| + | |||
| + | ## Autre | ||
| + | |||
| + | Défaire / inverser un patch (Undo patch) | ||
| + | ~~~bash | ||
| + | interdiff -q file.patch /dev/null > reversed.patch | ||
| + | ~~~ | ||
| + | |||
