前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >git review报错一例

git review报错一例

作者头像
洗尽了浮华
发布2018-01-22 15:09:41
7890
发布2018-01-22 15:09:41
举报
文章被收录于专栏:散尽浮华散尽浮华

在线上修改代码,最后使用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

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2016-07-19 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档