我使用的 Git-1.7.11-preview20120710.exe。我创建了一个 git 存储库
cd "GIT scm/"
git init --bare shahed.git
cd shahed.git
git update-server-info
然后我通过以下命令启动 git daemon
git daemon --reuseaddr --base-path="E:/GIT scm/" --export-all --verbose --enable=receive-pack
然后我克隆git存储库如下
git clone git://localhost/shahed.git
Cloning into 'shahed'...
warning: You appear to have cloned an empty repository.
cd shahed
touch shahed.txt
touch shohel.txt
git add *.*
git commit -m 'ok'
[master (root-commit) 2062f1d] 'ok'
0 files changed
create mode 100644 shahed.txt
create mode 100644 shohel.txt
git push
No refs in common and none specified; doing nothing.
Perhaps you should specify a branch such as 'master'.
Everything up-to-date
虽然 git 守护进程控制台记录以下消息
[4044] Ready to rumble
[736] Connection from [::1]:50076
[736] Extended attributes (16 bytes) exist <host=localhost>
[736] Request upload-pack for '/shahed.git'
[4044] [736] Disconnected
[4860] Connection from [::1]:50079
[4860] Extended attributes (16 bytes) exist <host=localhost>
[4860] Request receive-pack for '/shahed.git'
[4860] fatal: The remote end hung up unexpectedly
但我无法 git push。有人告诉我我错过了创建 git 存储库的哪一步。我采取的所有举措都可以,或者配置git存储库的不足之处在哪里。