On Wednesday, July 9, 2014 9:49:18 AM UTC+2, loody mil wrote: > > hi all: > below is my directories level > level 0 --> level 1 --> level 2 --> level 3 > > Below is my environment: > the git repository is located at level 0. > my modifications are located in level2 > 1. I use git diff create patch > 2. receiver's root directory is at level2 > 3. the receiver need to use patch -p3 < xxx.patch. > > Below are my questions: > how could I create patch that the receiver will only need to use -p1 when > his root directory is located in level2 > I try option "--no-prefix" but only eliminate one level. >
See the git diff --relative option: https://www.kernel.org/pub/software/scm/git/docs/git-diff.html -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.