I have always used diff -b to make patches even when working on a git repo.
- What is the difference between the two, does
git diff / git format-patchalso internally makes use of the linux/unixdiffcommand? (I know the difference betweengit diff/git format-patch) - Also, how is patching with
patch -p1different fromgit apply. Can i apply a patch generated by thediffcommand (diff -b) and apply usinggit diff? - Is it a good practice to use
git diff/applywhen working withgit? I have been usingdiff/patchand never faced any problem.
Please correct me if my knowledge of things mentioned above is not adequate.