git review报错一例

简介:

 

在线上修改代码,最后使用git review提交代码审核的时候出现报错如下:
[wangshibo@115~]$ vim testfile           #修改代码
[wangshibo@115~]$ git add testfile 
[wangshibo@115~]$ git commit -m "123"
[wangshibo@115~ ]$ git review
Errors running git rebase -i remotes/gerrit/master
Interactive rebase already started
.....

解决办法:
[wangshibo@115~]$ git review -v
2016-07-19 15:37:49.838087 Running: git log --color=never --oneline HEAD^1..HEAD
2016-07-19 15:37:49.841756 Running: git remote
2016-07-19 15:37:49.844743 Running: git branch -a --color=never
2016-07-19 15:37:49.847957 Running: git rev-parse --show-toplevel --git-dir
2016-07-19 15:37:49.850729 Running: git remote update gerrit
Fetching gerrit
2016-07-19 15:37:49.962033 Running: git rebase -i remotes/gerrit/master
Errors running git rebase -i remotes/gerrit/master
Interactive rebase already started


使用“git rebase -i --abort”命令重来:

[wangshibo@115~]$ git rebase -i --abort
[wangshibo@115~]$ git review -v
2016-07-19 15:39:02.470947 Running: git log --color=never --oneline HEAD^1..HEAD
2016-07-19 15:39:02.474624 Running: git remote
2016-07-19 15:39:02.477638 Running: git branch -a --color=never
2016-07-19 15:39:02.480825 Running: git rev-parse --show-toplevel --git-dir
2016-07-19 15:39:02.483649 Running: git remote update gerrit
Fetching gerrit
2016-07-19 15:39:02.595045 Running: git rebase -i remotes/gerrit/master
Errors running git rebase -i remotes/gerrit/master
Automatic cherry-pick failed. After resolving the conflicts,
mark the corrected paths with 'git add <paths>', and
run 'git rebase --continue'
Could not apply 0e37bdc... test

[wangshibo@115~]$ git add testfile 
[wangshibo@115~]$ git rebase --continue                 # 继续变基并且返回到原来的HEAD处
[detached HEAD d854154] test
1 files changed, 4 insertions(+), 0 deletions(-)
Successfully rebased and updated refs/heads/master.

[wangshibo@115~]$ git commit -m "123"
# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
#
nothing to commit (working directory clean)


最后再次git review就成功了
[wangshibo@115~]$ git review
remote: Resolving deltas: 100% (1/1)
remote: Processing changes: new: 1, refs: 1, done 
remote: 
remote: New Changes:
remote: http://103.10.86.30:80/16 test
remote: 
To ssh://wangshibo@103.10.86.30:29418/xqsj_android.git
* [new branch] HEAD -> refs/publish/master

 

***************当你发现自己的才华撑不起野心时,就请安静下来学习吧***************
本文转自散尽浮华博客园博客,原文链接:http://www.cnblogs.com/kevingrace/p/5685226.html ,如需转载请自行联系原作者
相关文章
|
6月前
|
存储 Java 开发工具
【Git】Git报错:This repositorysize xxMB, exceeds 1024.00 MB.
Git报错:This repositorysize xxMB, exceeds 1024.00 MB. 错误原因:这个版本库(包括wiki)大小为xxxx MB,超过了1024.00 MB。 如何解决呢?
84 0
|
3天前
|
算法 Java BI
云效产品使用报错问题之平台上导出的统计数据和 git 中使用命令导出的数据统计都对不上,如何解决
本合集将整理呈现用户在使用过程中遇到的报错及其对应的解决办法,包括但不限于账户权限设置错误、项目配置不正确、代码提交冲突、构建任务执行失败、测试环境异常、需求流转阻塞等问题。阿里云云效是一站式企业级研发协同和DevOps平台,为企业提供从需求规划、开发、测试、发布到运维、运营的全流程端到端服务和工具支撑,致力于提升企业的研发效能和创新能力。
|
5天前
|
开发工具 git
git 拉取代码仓库代码报错(合并错误 refusing to merge unrelated histories)
git 拉取代码仓库代码报错(合并错误 refusing to merge unrelated histories)
15 0
|
5天前
|
开发工具 git
完美解决git 执行git push origin master指令 报错command not found
完美解决git 执行git push origin master指令 报错command not found
11 0
|
5月前
|
网络安全 开发工具 git
git clone之报错git@gitee.com:Permission denied (publickey).fatal: Could not read from remote repository
git clone之报错git@gitee.com:Permission denied (publickey).fatal: Could not read from remote repository
178 0
|
1月前
|
开发工具 git
git报错 Unable to create ‘D:/project/xxx/.git/index.lock‘: File exists.
git报错 Unable to create ‘D:/project/xxx/.git/index.lock‘: File exists.
82 1
|
3月前
|
开发工具 数据安全/隐私保护 git
git报错: git: not authorized :未经授权解决办法
git报错: git: not authorized :未经授权解决办法
79 0
|
9月前
|
存储 开发工具 git
使用 git push 上传超过100MB文件报错 remote: error: this exceeds GitHub‘s file size limit of 100.00 MB
Git 大文件存储(LFS)用 Git 中的文本指针替换音频示例、视频、数据集和图形等大文件,同时将文件内容存储在 GitHub.com 或 GitHub Enterprise 等远程服务器上。
176 0
|
10月前
|
开发工具 git
【经验分享】关于RT-Thread studio gitee源下载软件包失败以及git拉取Gitee仓库报错
【经验分享】关于RT-Thread studio gitee源下载软件包失败以及git拉取Gitee仓库报错
220 0
|
5月前
|
开发工具 git
git push origin master提交报错解决办法
git push origin master提交报错解决办法
76 0

热门文章

最新文章

相关实验场景

更多