{{tag>Brouillon}} # Créer un patch - diff Voir aussi : * JSON RFC 6902 patch Source: https://docs.moodle.org/dev/How_to_create_a_patch ~~~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 --stdout > .patch ~~~ ## Autre Défaire / inverser un patch (Undo patch) ~~~bash interdiff -q file.patch /dev/null > reversed.patch ~~~