Skip to content

Apply a Patch to Main Branch

feliciss edited this page Apr 24, 2024 · 3 revisions

The main branch is synced with the newest commit from upstream. It could be replaced with a Git patch, or with a Rust patch-creates package (WIP).

Generate a Patch

Generate a patch for a branch and then switch to main branch and apply the patch.

Firstly, checkout to a patch branch, e.g. fastcrypto-patch-2023, and generate a patch:

git format-patch -<n> HEAD --stdout > fastcrypto-patch-2023.patch

Here, replace "n" with a number matched to the maximum commit numbers from HEAD.

Apply a Patch

Switch to main branch and apply the patch:

git am fastcrypto-patch-2023.patch
Clone this wiki locally