0
我有一个由6个文件组成的Git补丁。如何从Git补丁文件应用特定文件?
- abc.php
- pqr.php
- zyz.php
- rrr.php
- ggg.php
- yyy.php
我只想申请来自.patch
的文件rrr.php包含上述文件
git-apply
命令包含--exclude
参数,但不包括--include
。
如何从.patch
文件中只应用rrr.php?
我有一个由6个文件组成的Git补丁。如何从Git补丁文件应用特定文件?
我只想申请来自.patch
的文件rrr.php包含上述文件
git-apply
命令包含--exclude
参数,但不包括--include
。
如何从.patch
文件中只应用rrr.php?
你说:
git-apply
命令包括--exclude
阿根廷,但不--include
--include=<path-pattern>
将更改应用到文件配套配件g给定的路径模式。这在导入补丁集时很有用,您想要在其中包含某些文件或目录。
尝试:
git apply --include=rrr.php some.patch
使用Git版本1.8.4验证。