Girrit常见问题以及解决方案

来源:互联网 发布:路由追踪命令 linux 编辑:程序博客网 时间:2024/06/18 14:53
提示 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

0 0
原创粉丝点击