[Solved] Git review Error: Errors running git rebase -i remotes/gerrit/master

The following error was reported when the code was modified online and finally submitted for review using git review.
[[email protected]~]$ vim testfile           #Modify
[[email protected]~]$ git add testfile
[[email protected]~]$ git commit -m “123”
[[email protected]~ ]$ git review
Errors running git rebase -i remotes/gerrit/master
Interactive rebase already started
…..

Solution:
[[email protected]~]$ 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

Use the “git rebase -i –abort” command to start over.

[[email protected]~]$ git rebase -i –abort
[[email protected]~]$ 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

 

[[email protected]~]$ git add testfile
[[email protected]~]$ git rebase –continue                # Continue to change the base and return to the original HEAD
[detached HEAD d854154] test
1 files changed, 4 insertions(+), 0 deletions(-)
Successfully rebased and updated refs/heads/master.

[[email protected]~]$ git commit -m “123”
# On branch master
# Your branch is ahead of ‘origin/master’ by 1 commit.
#
nothing to commit (working directory clean)

Finally the git review works again
[[email protected]~]$ 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://[email protected]:29418/xqsj_android.git
* [new branch] HEAD -> refs/publish/master

Similar Posts: