2

I have two directories src and src-with-fixes. I want to make a unified patch, so people can download the src dir and the patch file and run patch -p1 < patch.diff and get the fixes in the src dir.

1 Answer 1

4

You could run:

diff -ruN src src-with-fixes > patch.diff

Where:

  • -r means "recursive"
  • -u means "produce a unified format diff"
  • -N means "treat absent files as empty"
2
  • 1
    Incidentally, using git (or other VCS) makes this process a little more manageable. Definitely worth looking into if you have not worked with a version control system before.
    – larsks
    Aug 26, 2015 at 13:30
  • I know of Git and I use it, but for this I don't want to use Git
    – wb9688
    Aug 26, 2015 at 14:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .