2

每当我尝试使用我的一些 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

如果我分别执行这些命令中的每一个,它就可以完美地工作。这个别名已经工作了很长一段时间,但偶尔会失败。谷歌一直非常渴望获得有关丢失工作树的信息。

有什么见解吗?提前致谢。

4

0 回答 0