Sunday, February 15, 2026

git patch automatic code replacement in repository

git show commitID -- folder/ >> 001commitID.patch

cd to fresh git repo without changes and

git apply 001commitID.patch

git format-patch -10 --author="YOURNAME" // look 10 commits and creat separate patch files

git apply ../0001-your.patch

git log -p // full commit history with code changes (the patch/diff output) for each commit

No comments:

Post a Comment