hi : Thomas Ferris Nicolaisen於 2014年7月11日星期五UTC+8下午5時01分53秒寫道： > > 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 > > is there any similar option as "--relative" option in "git format-patch"? I try to use git format-patch based on different directory level, but I cannot find the similar option as "--relative".
appreciate your help in advance, -- 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.