There are two branches. I've pushed a commit in branch working
. Now I want to merge it in master
branch. How to do that and are there any possible conflicts? I mean if in my local machine I don't have some actual code from branch master
, how should I merge them? Should it looks like this:
git checkout master git merge working git push origin master
Steps to merge branch "working" into branch "master":
Checkout "master" branch
$ git checkout master
[If you don't have the latest code]Pull from remote "master" to make sure your code is up to date:
$ git pull origin master
Merge branch "working" into "master"
$ git merge working
Fix any conflicts that may arise
If all is ok, push "master" back out to remote
$ git push origin master
When you merge "working" into "master", there can definitely be merge conflicts. There is no way for us to predict whether or not you'll run into any, as that depends on what changes you have made in "working", and work others may have done on "master".
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.