Girrit常见问题以及解决方案

提示 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
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值