How do I use --relative with git format-patch?

微笑、不失礼 提交于 2019-12-13 12:04:44

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!