3

私は次のようになりますgit review

git review
You are about to submit multiple commits. This is expected if you are
submitting a commit that is dependent on one or more in-review
commits. Otherwise you should consider squashing your changes into one
commit before submitting.

The outstanding commits are:

2de3eef (HEAD -> AddingReleaseIndex) Adding index page for subrelease projects
d3dbc89 (Addingindex) Add index with submodules

Do you really want to submit the above commits?
Type 'yes' to confirm, other to cancel: no
Aborting.

私には多くのブランチがあり、それぞれに特定の機能が実装されています。HEAD (2de3eef) のコミットを確認のために送信したいだけで、他には何もありません。

git cherry-pick を使用して、選択したコミットを別のブランチに移動し、別のブランチからレビューのために送信できるという記事を見つけました。特定の機能に関するものなので、同じブランチを介して送信したいので、別のブランチを介してレビューのために送信したくありません。

この状況を回避するにはどうすればよいですか?

4

2 に答える 2

2

これを行う 1 つの方法は、 を使用してコミットの順序を変更し、必要なコミットが送信したくないgit rebase -i他のコミットに依存しないようにすることです。

于 2017-01-03T22:39:59.887 に答える