1
我遇到了我不理解的情況。我有一個在WebDAV/apache上運行的遠程git倉庫。可以肯定的是,我登錄了服務器並在相關目錄(顯然是root)上運行「chown -R wwwrun:www *」和「git update-server-info」。git:remote'refs/heads/master'的問題不是本地'refs/heads/master'的祖先
現在,我做的:
git clone http://myserver/myrepo
則:
$git remote show origin
* remote origin
Fetch URL: http://myserver/myrepo
Push URL: http://myserver/myrepo
HEAD branch: master
Remote branches:
master tracked
trunk tracked
trunk2.0 tracked
Local branch configured for 'git pull':
master merges with remote master
Local ref configured for 'git push':
master pushes to master (fast-forwardable)
,然後我改變任何文件,舞臺,承諾和努力推動,這導致:
error: remote 'refs/heads/master' is not an ancestor of
local 'refs/heads/master'.
顯然,任何拉動的嘗試都是毫無意義的:
$git pull
Already up-to-date.
幾天前該存儲庫還好。我如何再次使用它?
您最近是否從原產地改造了分支? Git不會讓你推動,如果你已經刪除已發佈的提交,除非你強制它。請參閱http://book.git-scm.com/3_distributed_workflows.html –
有人試圖推動,但這導致「捲曲HTTP錯誤403」 - 這是問題的開始。我期望在遠程倉庫設置中的某些內容被破壞(例如文件被鎖定,HEAD等錯誤)我打算將最近的本地倉庫遠程克隆到服務器,希望這不會搞亂太多了。但也許有更好的解決方案 – tnorgd
這可能是相同的問題,因爲http://serverfault.com/questions/256376/cant-push-to-git-remote-repositories/460288#460288(相同的錯誤信息) – JonnyJD