cd <magento_root>
mkdir -p m2-hotfixes/tmp
- Copy original files
cp --parents <path/to/yout/file1> <path/to/yout/file2> ... m2-hotfixes/tmp
OR
rsync -R <path/to/yout/file1> <path/to/yout/file2> ... m2-hotfixes/tmp
cd m2-hotfixes/tmp
git init && git add . && git commit -m "Initial commit"
- Make changes in files in m2-hotfixes/tmp directory
git add . && git commit -m "Fix something"
git format-patch -1 HEAD -o ..
format-patch will generate .patch file in m2-hotfixes directorycd <magento_root>
rm -rf m2-hotfixes/tmp
- to apply all patches locally run the command
vendor/bin/ece-tools patch
Last active
April 1, 2020 13:35
-
-
Save martinboy/bbed918e841c9bb716a070f8b6f38afb to your computer and use it in GitHub Desktop.
Magento: In case when you need to create a custom patch for any code which is in gitignore (for example modules in vendor/ directory)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment