这是针对Windows 10
的,命令是从Git Bash
运行的,我正在运行Git v2.21.0
。
我正在创建一个全新的bare
存储库,并试图弄清它们的工作方式。我已经成功建立了连接,push
,pull
,add
,commit
等。我一直遇到问题的一件事是尝试克隆该文件后出现此错误。使用不同名称的相同远程位置存储库。即使删除以远程位置命名的本地存储库,也仍然无法执行。这是我的步骤,适用于我的本地计算机和服务器。
服务器
$ git init rep.git --bare
Initialized empty Git repository in //myLocation/rep.git/
本地PC
$ git clone //myLocation/rep.git
Cloning into 'rep'...
warning: You appear to have cloned an empty repository.
done.
$ cd rep
$ echo 123 > file.txt
$ git add .
warning: LF will be replaced by CRLF in file.txt.
The file will have its original line endings in your working directory
$ git commit -m'adding file'
[master (root-commit) 6ae32fb] adding file
1 file changed, 1 insertion(+)
create mode 100644 file.txt
$ git push
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Writing objects: 100% (3/3), 216 bytes | 72.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To //myLocation/rep.git
* [new branch] master -> master
所以到这里为止,一切都很花哨,接下来是问题:
$ git clone //myLocation/rep.git rep2
Cloning into 'rep2'...
fatal: failed to open '//myLocation/rep.git/objects/19/(sha1_stuff)'
: Function not implemented
fatal: the remote end hung up unexpectedly
我已经多次创建了。我在这里想念什么吗?