I have two branches in bitbucket and I want to push only some commits (which are approved by me) from one branch to another branch which is a master branch. Can someone explain to me how I can do it in the bitbucket environment?
Thanks in advance.
I have two branches in bitbucket and I want to push only some commits (which are approved by me) from one branch to another branch which is a master branch. Can someone explain to me how I can do it in the bitbucket environment?
Thanks in advance.
you can use 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