Repo upload missing tree,突然就出现这种情况,本地代码 git pull 是最新的
1. 首先 git branch -a
....
.....
remotes/aosp/test
remotes/m/wingtech -> aosp/ap_sdm_xxx_my_xxxx
最后的解决是 git push --no-thin aosp HEAD:refs/for/ap_sdm_xxx_my_xxx --- 名字要写对,按照上面查询的
网上有这种的 http://blog.csdn.net/liuxu0703/article/details/54289873
git push --receive-pack='git receive-pack --reviewer xxx@xxx.cn --reviewer xx@xx.cn' review HEAD:refs/for/master
Counting objects: 1, done.
xxxxxx
xxxxxx
无法提交成功
git push --no-thin review HEAD:refs/for/master
发生本文中出现的问题,貌似是因为某个 git 对象和服务器不一致了.
这时加上 --no-thin 参数,把该传的都传过去,问题就解决了.
2018-8-30 补充, 同事出现了一样的问题,使用此命令出现错误
如果push 不成功 去掉 .git 文件夹下的 condifg 里面的 http://192.168.xx.xx/main/plartm/xxx --- 把main去掉试试
2. 如果尝试1 不行, 那就继续先按照2修改, 再执行1
cd .git --- 切换到当前无法提交的目录下的 git
vi config --- 查看
core]
repositoryformatversion = 0
filemode = true
[filter "lfs"]
smudge = git-lfs smudge --skip -- %f
[remote "aosp"]
url = git://192.168.xx.xx/main/platform/vendor/qcom/proprietary/qrdplus --- 修改这里的URL到真正项目的URL 或其他URL 尝试
review = http://192.168.xx.xx
projectname = platform/vendor/qcom/proprietary/qrdplus
fetch = +refs/heads/*:refs/remotes/aosp/*
[branch "work"]
remote = aosp
merge = refs/heads/ap_sdm_xxx_xxxxx
~
2. 如果尝试1 不行, 那就继续先执行2
cd .git
vi config
core]
repositoryformatversion = 0
filemode = true
[filter "lfs"]
smudge = git-lfs smudge --skip -- %f
[remote "aosp"]
url = git://192.168.38.99/main/platform/vendor/qcom/proprietary/qrdplus --- 修改这里的URL
review = http://192.168.30.13
projectname = platform/vendor/qcom/proprietary/qrdplus
fetch = +refs/heads/*:refs/remotes/aosp/*
[branch "work"]
remote = aosp
merge = refs/heads/ap_sdm450_spf2.0_cmcc_n3_rom
~
....
.....
remotes/aosp/test
remotes/m/wingtech -> aosp/ap_sdm450_spf2.0_my_git
git push --no-thin aosp HEAD:refs/for/ap_sdm450_spf2.0_cmcc_n3_rom
....
.....
remotes/aosp/test
remotes/m/wingtech -> aosp/ap_sdm450_spf2.0_my_git
git push --no-thin aosp HEAD:refs/for/ap_sdm450_spf2.0_cmcc_n3_rom
....
.....
remotes/aosp/test
remotes/m/wingtech -> aosp/ap_sdm450_spf2.0_my_git
git push --no-thin aosp HEAD:refs/for/ap_sdm450_spf2.0_cmcc_n3_rom