有什么方法可以在开发分支上只发布特定提交的 GitFlow 版本吗?
Is there any way to make a GitFlow release with only specific commits on the develop branch?
我希望标题是不言自明的,但这里是:
我对 develop 分支有多个提交,我只需要将其中的一些提交到 master 分支,如果可能的话通过发布(这是我更喜欢的方式)。有什么办法可以实现吗?
I have multiple commits to the develop branch and I need only to push some of the to the master branch
你应该使用git cherry-pick
git cherry-pick <SHA-1> <SHA-1> <SHA-1> ...
Apply the change introduced by the commit at the tip of the master branch and create a new commit with this change.
您还可以为 cherry-pick 指定一个范围
git cherry-pick <SHA-1>...<SHA-1>
我希望标题是不言自明的,但这里是:
我对 develop 分支有多个提交,我只需要将其中的一些提交到 master 分支,如果可能的话通过发布(这是我更喜欢的方式)。有什么办法可以实现吗?
I have multiple commits to the develop branch and I need only to push some of the to the master branch
你应该使用git cherry-pick
git cherry-pick <SHA-1> <SHA-1> <SHA-1> ...
Apply the change introduced by the commit at the tip of the master branch and create a new commit with this change.
您还可以为 cherry-pick 指定一个范围
git cherry-pick <SHA-1>...<SHA-1>