User docs

This page contains information useful to people who want to use the .patch files generated by patchtree.

Applying a patch

  1. Download the .patch file for your source tree and place it in the directory where it should apply

  2. Rename the downloaded file to .patchtree.diff

  3. Open Git bash (on Windows) or any shell (if on *NIX) in the directory with the patch

  4. Mark the patch as executable by running:

    $ chmod +x .patchtree.diff
    
  5. Apply the patch by running:

    $ ./.patchtree.diff
    

If all goes well, this command should produce no output and the source files will have been updated. In case the patch fails to apply without producing any output, the above command can be ran with the -v option to produce verbose output. Any command-line options recognized by git-apply(1) can also be used.

Reverting a patch

To revert the changes of a patch, run the following command in the target directory:

$ ./.patchtree.diff --reverse

Upgrading a patch

Upgrading a patch consists of

  1. Reverting the current (old) patch

  2. Repeating the steps from Applying a patch using the new patch file