error: unable to create symlink, fatal: Could not reset index file to revision 'HEAD'

error: unable to create symlink, fatal: Could not reset index file to revision 'HEAD'

我正在尝试使用 git reset origin/dev --hard

进行硬重置
...
error: unable to create symlink Codes/Pods/Headers/Public/libPhoneNumber-iOS/NBPhoneNumberDefines.h: No such file or directory
error: unable to create symlink Codes/Pods/Headers/Public/libPhoneNumber-iOS/NBPhoneNumberDesc.h: No such file or directory
error: unable to create symlink Codes/Pods/Headers/Public/libPhoneNumber-iOS/NBPhoneNumberUtil.h: No such file or directory
error: unable to create symlink Codes/Pods/Headers/Public/libPhoneNumber-iOS/NBRegExMatcher.h: No such file or directory
error: unable to create symlink Codes/Pods/Headers/Public/libPhoneNumber-iOS/NBRegularExpressionCache.h: No such file or directory
error: unable to create symlink Codes/Pods/Headers/Public/libPhoneNumber-iOS/NSArray+NBAdditions.h: No such file or directory
fatal: Could not reset index file to revision 'origin/dev'.

然后我看到了一些未暂存的文件,当我在 git add .

之后尝试 运行 git stash 时出现以下错误
...
error: unable to create symlink Codes/Pods/Headers/Public/libPhoneNumber-iOS/NBPhoneNumberDefines.h: No such file or directory
error: unable to create symlink Codes/Pods/Headers/Public/libPhoneNumber-iOS/NBPhoneNumberDesc.h: No such file or directory
error: unable to create symlink Codes/Pods/Headers/Public/libPhoneNumber-iOS/NBPhoneNumberUtil.h: No such file or directory
error: unable to create symlink Codes/Pods/Headers/Public/libPhoneNumber-iOS/NBRegExMatcher.h: No such file or directory
error: unable to create symlink Codes/Pods/Headers/Public/libPhoneNumber-iOS/NBRegularExpressionCache.h: No such file or directory
error: unable to create symlink Codes/Pods/Headers/Public/libPhoneNumber-iOS/NSArray+NBAdditions.h: No such file or directory
fatal: Could not reset index file to revision 'HEAD'.

可能是什么原因以及如何解决?

问题已通过以下命令解决,

git config --global core.symlinks false