我在bitbucket中有两个分支,我想只将一些提交(由我批准)从一个分支推送到另一个分支,这是一个主分支。 有人可以向我解释我如何在bitbucket环境中做到这一点吗?
提前致谢。
答案 0 :(得分:1)
您可以使用 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