简体   繁体   中英

git merge changes both local and remote branch

I have 2 branches local and remote like below.

# dev
  master

Right now I have merged changes local using git checkout master & git merge dev. It works great. Using git status I got below:

Your branch is ahead of 'origin/master' by 46 commits.
  (use "git push" to publish your local commits)

nothing to commit, working directory clean 

But the remote I haven't done anything yet. So how to merge remote branches? Should I just git push origin master? or what?

You don't have to "merge the remote branches" but update their references according to your local changes (merge or whatever else).

Just git push origin master to update the remote master with your local merge of dev branch.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM