15

我正在尝试安装utilsnips

当我输入:

cd ~/.vim/ 
git submodule add https://github.com/SirVer/ultisnips bundle/ultisnips 

我收到这条消息:

You need to run this command from the toplevel of the working tree.

为什么?我怎样才能避免它?

4

2 回答 2

11

您的.vim目录可能不是git目录。简单地使它成为一个git目录:

git init

然后你可以运行:

git submodule add https://github.com/SirVer/ultisnips bundle/ultisnips
于 2013-09-22T17:07:18.017 回答
10

您可能正在从子目录运行命令。确保您位于与 .git 目录相同级别的目录中。

于 2017-02-07T06:38:36.450 回答