Outils pour utilisateurs

Outils du site


tech:creer_un_patch_-_diff

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

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.1tech:creer_un_patch_-_diff [2026/06/07 19:12] (Version actuelle) – modification externe 127.0.0.1
Ligne 1: Ligne 1:
 +<!DOCTYPE markdown>
 +{{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 <sha1> --stdout > <name>.patch
 +~~~
 +
 +## Autre
 +
 +Défaire / inverser un patch (Undo patch)
 +~~~bash
 +interdiff -q file.patch /dev/null > reversed.patch
 +~~~
 +
  

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki