我正在嘗試這個codereview工具。我在使用git時遇到問題。 這是git status
輸出:與Git的ReviewBoard。 「似乎沒有任何差異!」但有
似乎有不爲任何進行比較:
# On branch master # Changes not staged for commit: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: path/to/something/modified.js # # Untracked files: # (use "git add <file>..." to include in what will be committed) # # .gitignore # .reviewboardrc
,如果我嘗試在此狀態下,我得到這個消息運行
post-review --guess-summary --guess-description -p
!現在
,如果我跑git add -u
,我git status
是:
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: path/to/something/modified.js
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# .gitignore
# .reviewboardrc
在這種情況下,如果我再次運行post-review --guess-summary --guess-description -p
我仍然得到了同樣的信息:
有別似乎是任何差異!
此時如果我用命令git commit -m "my commit"
提交它我有以下消息(明顯):
[主027e044]我提交1個文件改變時,1個插入(+)
,我再次運行後審查命令我有輸出:
Review request #22 posted.
http://192.168.133.218/r/22/
這讓我爲難,因爲如果你去閱讀ReviewBoard FAQ這裏的消息:
使用Git的基本預提交的工作流程是這樣的:
Clone the central repository. Make a change you want reviewed, but do not commit it yet. Run post-review (or otherwise submit a diff). Get reviews, update your change as needed. When the change is marked to ship, commit it to master and push it to the origin.
因爲我的本意是做一個預 - 提交,你可以向我解釋爲什麼在階段更改提交後沒有差異?
解決方法鏈接已過時。 – mateor