【发布时间】:2016-02-13 17:12:30
【问题描述】:
为什么这个命令不起作用?
git diff | git --git-dir=/other/location/.git --work-tree=/other/location apply
以下工作完美:
git diff > /tmp/my.patch
cd /other/location && git apply /tmp/my.patch
/other/location是当前目录的镜像。
通过管道命令我得到
error: patch failed: myfile.php:1
error: myfile.php: patch does not apply
【问题讨论】:
-
您是否尝试使用
git diff | git .... apply -告诉git-apply使用来自标准输入的补丁数据?