Produce a diff compatible with patch command

suggest change

Sometimes you need a diff that patch can apply. A normal git diff prefixes paths with a/ and b/, so apply that output with patch -p1. To drop the prefixes and apply with patch -p0:

git diff --no-prefix > some_file.patch

Then somewhere else you can reverse it:

patch -p0 < some_file.patch

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents