Créer un patch - diff

Voir aussi :

JSON RFC 6902 patch

Source: https://docs.moodle.org/dev/How_to_create_a_patch

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

git show > patch.txt

If you want to create a patch between 2 specific commits you can use git diff

git diff commitid1 commitid2 > patch.txt

Il existe aussi git format-patch pour pouvoir facilement envoyer un patch par mail

git format-patch -n #git format-patch -1 <sha1> --stdout > <name>.patch

Autre

Défaire / inverser un patch (Undo patch)

interdiff -q file.patch /dev/null > reversed.patch