如何将批准的提交从一个分支推送到 bitbucket 中的另一个分支
How push approved commits from one branch to another branch in bitbucket
我在 bitbucket 中有两个分支,我只想将一些提交(经我批准)从一个分支推送到另一个分支,这是一个主分支。
有人可以向我解释一下我如何在 bitbucket 环境中做到这一点吗?
提前致谢。
你可以使用git cherry-pick
步骤
1. git log
this will list all commits take the commit id which you wanted to move.
2. git cherry-pick <commit-id>
apply this after switching to master branch
3.then push new master to remote
git push <REMOTENAME> <BRANCHNAME>
eg. git push origin master
or
git push <REMOTENAME> <LOCALBRANCHNAME>:<REMOTEBRANCHNAME>
eg:
if my remote name is heroku and i want to push local heroku branch to heroku(remote) master barnch(heroku/master)
git push heroku heroku:maste
链接
What does cherry-picking a commit with git mean?
我在 bitbucket 中有两个分支,我只想将一些提交(经我批准)从一个分支推送到另一个分支,这是一个主分支。 有人可以向我解释一下我如何在 bitbucket 环境中做到这一点吗?
提前致谢。
你可以使用git cherry-pick
步骤
1. git log
this will list all commits take the commit id which you wanted to move.
2. git cherry-pick <commit-id>
apply this after switching to master branch
3.then push new master to remote
git push <REMOTENAME> <BRANCHNAME>
eg. git push origin master
or
git push <REMOTENAME> <LOCALBRANCHNAME>:<REMOTEBRANCHNAME>
eg:
if my remote name is heroku and i want to push local heroku branch to heroku(remote) master barnch(heroku/master)
git push heroku heroku:maste
链接
What does cherry-picking a commit with git mean?