2012-06-11 42 views
3

我正在使用git。git and gerrit while while review

當我提交的代碼,它的罰款,但回顧其投擲的錯誤

$ git review 

給了我以下錯誤消息時:

Is this really what you meant to do? 
Type 'yes' to confirm: yes 
remote: Resolving deltas: 100% (28/28) 
remote: Processing changes: refs: 1, done  
To ssh://[email protected]:29418/bdu-celery 
! [remote rejected] HEAD -> refs/publish/master/abc_org_uk_geography (change 257 closed) 
error: failed to push some refs to 'ssh://[email protected]:29418/bdu-celery' 

誰能讓我們現在如何解決這一問題

謝謝

+2

'git review'不是標準的git命令。所以有人提供了一個名爲'git-review'的腳本,它正在爲你推動。您可能想與任何爲您提供該腳本的人交談。您看到的警告是由於將更新推送到不是快速更新的遠程分支。在這種情況下,這可能是可以的,在這種情況下,它可能會被迫,但我不知道該腳本可能會有什麼期望。可能你已經做了rebase,不應該有。 – patthoyts

回答

0

git review看起來像是一個git命令的別名。我認爲它使用了錯誤的目標參考規格。

您可以使用推你的代碼格里特右裁判規範的服務器,如

git push gerrit HEAD:refs/for/master 
  • 格里特是格里特混帳回購協議

  • 的名稱假設你想要把工作分支到主

0

這裏的問題很簡單,你試圖推動一個封閉的評論 - 「(改變257封閉)」。

變化257由變更-ID在你提交信息確定,如:

commit 67b36a52914afc3098d9da6750bb8f3d4a9561ac 
Author: Paul Bourke <[email protected]> 
Date: Wed Mar 12 16:45:53 2014 +0000 

    Hello World 

    Change-Id: I5e6481e8c069591272d1aee5ab1197e94354ba8c 

如果你想提交此作爲新的審查,刪除更改-ID和git審查將產生一個新的一個:

git commit --amend 
# delete the Change-Id line and save 
git commit --amend