1
Git-1.7.11-preview20120710.exe由我使用。我創建了一個Git倉庫無法在本地存儲庫上按住git push
cd "GIT scm/"
git init --bare shahed.git
cd shahed.git
git update-server-info
然後,我通過以下命令啓動Git進程
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存儲庫的哪一步。我採取的所有措施都可以,或者缺少配置git存儲庫的地方。
我按照您的回答進行了測試,但無法創建主分支庫創建/克隆時間。我用武力選項,但不工作。 'git push -f origin master'需要很長時間,最後我強行終止它。 –
這聽起來更像是你的'git-daemon'配置或防火牆設置的問題。我手動重新創建了你的測試,'git push origin master'肯定爲我工作(但是不合格的'git push'沒有。 – twalberg
防火牆未被阻止。到目前爲止,我可以猜測缺少/未命中配置/某些與路徑設置相關的問題。你能否介紹一下我將從哪裏開始的網頁鏈接? –