4
在Bitbucket上,使用Bitbucket的網絡界面,我同步了一個有自己的私人分支的有福的回購出錯。我想重寫這個幸運回購的歷史記錄,讓它恢復正確的提交。Bitbucket上的Git歷史重寫[遠程拒絕] HEAD - >分支(預接收鉤子拒絕)
我克隆包含不正確我的提交和本地得天獨厚的回購上,其歷史被搞砸了分公司跑
git reset --hard HEAD~1
。
這使得克隆的repo回到了我在搞砸之前的提交。
我後來去把我的回購請在使用
git push -f origin development
到到位桶,但有以下錯誤
remote: permission denied to force push branch development
To [email protected]:blessed-repo/blessed-repo.git
! [remote rejected] HEAD -> development (pre-receive hook declined)
error: failed to push some refs to '[email protected]:blessed-repo/blessed-repo.git'
爲什麼我得到這個錯誤,以及如何可以使git push
工作?