我如何使用 - 相对于git format-patch? [英] How do I use --relative with git format-patch?
本文介绍了我如何使用 - 相对于git format-patch?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我使用 git diff --relative HEAD ^ .. HEAD
时,我得到了一些很好的输出,用于删除它所在目录之外的路径。
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.
我开始使用 git format-patch
,我也想用 - 相对
但没有看到任何选项。如何获得同样的效果?
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
推荐答案
git help format-patch
显示
git format-patch [-k] [(-o|--output-directory) <dir> | --stdout]
...
**[<common diff options>]**
所以,只需 git format-patch --relative
。
这篇关于我如何使用 - 相对于git format-patch?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文