您的位置:首页 > 其它

Girrit常见问题以及解决方案

2016-01-08 10:55 281 查看
提示 remote: ERROR: missing Change-Id in commit message footer。
临时解决方案

git commit --amend


打开commit信息,将change id贴进去再push

永久解决方案

git clone ssh://user@yourdomain:29418/my-test && scp -p -P 29418 user@yourdomain:hooks/commit-msg my-test/.git/hooks/


提示

Permission denied (publickey). fatal: Could not read from remote repository.

Please make sure you have the correct access rights

and the repository exists.

尝试使用root账户进行clone 以及其他操作

提示commit id重复或者已经存在
git log --oneline  #查看提交历史commit
git reset --hard <commit_id>  ##彻底回退到某个版本,本地的源码也会变为上一个版本的内容
git push origin HEAD --force  ##强制push

提示 ! [remote rejected] master -> master (prohibited by Gerrit)
表示由于Gerrit的保护无法直接推送到master,只能通过分支引用的形式

git config remote.origin.push refs/heads/*:refs/for/*


提示error: unpack failed: error Missing unknown HASH
由于之前的某个提交为处理导致,联系管理员。

管理员: 操作gerrit数据库

java -jar bin/gerrit.war gsql gerrit


select * from PATCH_SETS ;


找到那个HASH对应的change_id

update changes set open='N',status='A' where change_id=上面查到的;


提示error: unpack failed: error Missing tree
git版本超过1.8会出现该提示,在push的时候加上参数
--no-thin


git push --no-thin
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: