patch-package
patch-package copied to clipboard
"fatal: --local can only be used inside a git repository" when diffing files
Just simply running "npx patch-package XXX" to patch a package and resulting error:
• Creating temporary folder
• Installing [email protected] with npm
• Diffing your files with clean files
fatal: --local can only be used inside a git repository
patch-package version: 7.0.2
It's was found out that the issue was caused by newer version of git. I'm using Git for Windows with latest version 2.42.0-64-bit, it will cause such error. Downgrading git to 2.36.1-64-bit will resolve such issue.
Now it is still not sure which breaking changes from git will cause the error.