1
我想在特定標籤來創建一個Git倉庫的稀疏和淺克隆。建立在錯誤的git倉庫結果的稀疏和淺克隆:嘗試寫非承諾對象
這是我目前在做什麼:
git init avatica-tmp
cd avatica-tmp
git remote add origin https://github.com/apache/calcite-avatica/
git config core.sparsecheckout true
echo "core/src/main/protobuf/*" >> .git/info/sparse-checkout
git pull --depth=1 origin rel/avatica-1.10.0
它工作正常,但將引發一個錯誤:
remote: Counting objects: 531, done.
remote: Compressing objects: 100% (381/381), done.
remote: Total 531 (delta 147), reused 280 (delta 51), pack-reused 0
Receiving objects: 100% (531/531), 963.03 KiB | 233.00 KiB/s, done.
Resolving deltas: 100% (147/147), done.
From https://github.com/apache/calcite-avatica
* tag rel/avatica-1.10.0 -> FETCH_HEAD
fatal: update_ref failed for ref 'HEAD': cannot update ref 'refs/heads/master': trying to write non-commit object fe4f0b4ea3e2ee4f3b2e82329363a7945493a8c9 to branch 'refs/heads/master'
我得到這個錯誤使用Git 2.11.0在Ubuntu 17.04和Git 2.13 Windows 10 64位上的.2.windows.1。我不是試圖克隆到映射的驅動器。
是什麼原因導致這個錯誤,我該如何避免呢?
什麼是'git的貓文件的結果-t fe4f0b4ea3e2ee4f3b2e82329363a7945493a8c9'? – zigarn
這是我得到:'$ git的貓文件-t fe4f0b4ea3e2ee4f3b2e82329363a7945493a8c9 tag' – F21