========= User docs ========= This page contains information useful to people who want to use the .patch files generated by patchtree. .. _user_apply: **************** Applying a patch **************** #. Download the ``.patch`` file for your source tree and place it in the directory where it should apply #. Rename the downloaded file to ``.patchtree.diff`` #. Open Git bash (on Windows) or any shell (if on \*NIX) in the directory with the patch #. Mark the patch as executable by running:: $ chmod +x .patchtree.diff #. 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. .. _user_revert: ***************** 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 #. `Reverting the current (old) patch `_ #. Repeating the steps from :ref:`user_apply` using the new patch file