Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/sql-server-2008/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
丢失带有git别名的工作树_Git_Windows 7 - Fatal编程技术网

丢失带有git别名的工作树

丢失带有git别名的工作树,git,windows-7,Git,Windows 7,每当我尝试使用一些git别名时,我都会遇到这个错误 First, rewinding head to replay your work on top of it... fatal: C:\Program Files (x86)\Git/libexec/git-core\git-am cannot be used without a working tree. 特别是我的“git sync$1” 如果我分别执行这些命令中的每一个,它将完美地工作。这个别名已经使用了相当长的一段时间,但偶尔会失败。

每当我尝试使用一些git别名时,我都会遇到这个错误

First, rewinding head to replay your work on top of it...
fatal: C:\Program Files (x86)\Git/libexec/git-core\git-am cannot be used without a working tree.
特别是我的“git sync$1”

如果我分别执行这些命令中的每一个,它将完美地工作。这个别名已经使用了相当长的一段时间,但偶尔会失败。谷歌一直非常渴望得到关于丢失工作树的信息

有什么见解吗?提前谢谢

sync => !f() { git checkout $1 && git pull && git checkout - && git rebase $1 && git push --force origin HEAD;}; f