问题
When I use git diff --relative HEAD^..HEAD, I get some nice output for a patch that I strip out the path outside the directory it is in.
I am starting to use git format-patch and I would like to also use --relative but don't see any options for that. How would I get the same effect?
Thanks
回答1:
git help format-patch shows
git format-patch [-k] [(-o|--output-directory) <dir> | --stdout] ... **[<common diff options>]**
So, just git format-patch --relative.
来源:https://stackoverflow.com/questions/16309053/how-do-i-use-relative-with-git-format-patch