我遇到过Git行为,我无法完全理解。回购被数十人使用。案件是这样的:
$ git checkout master
$ git merge --no-commit feature
Automatic merge went well; stopped before committing as requested
$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
All conflicts fixed but you are still merging.
(use "git commit" to conclude merge)
Changes to be committed:
modified: web/webapp/grails-app/views/layouts/empty.gsp
$ git commit -m 'commit message'
[master e6cc2eb] commit message
$ git status
On branch master
Your branch is ahead of 'origin/master' by 21 commits.
(use "git push" to publish your local commits)
让我感到困惑的是这部分:
Your branch is ahead of 'origin/master' by 21 commits.
为什么它不是1?说清楚,那个empty.gsp文件只有一个变化。
实际上还有20个提交,但为什么它们在git status
之后才显示?我可能会遗漏任何暗示吗?