Git将本地主服务器推送到远程特定分支 [英] Git push local master to remote specific branch

查看:1423
本文介绍了Git将本地主服务器推送到远程特定分支的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在本地分支机构进行了更改.然后我结帐到我的master分支并将其与我的本地分支合并.现在,我想将master分支中的更改推送到远程的特定分支.说,我们是5个开发人员.每个人在远程仓库中都有自己的分支.如果我在本地存储库中修改了某些内容,则应将工作推送到以我的名字命名的分支上.

I did changes in my local branch. Then I checkout to my master branch and merge it with my local branch. Now I want to push the changes in the master branch to specific branch at the remote. Say, we are 5 Developers. Each one having their own branch at remote repo. If I modified something at my local repo, I should push my work on the branch which is named in my name.

如何将这些更改从我的本地存储库主推送到我的分支机构 远程回购?

How can I push that changes from my local repo master to my branch at remote repo?

一旦我将其推送到远程仓库中的分支机构,我就会将我的更新通知其他团队成员.

Once I pushed it to my branch at remote repo, I will inform my updation to my other team members.

他们如何获取并合并位于我的远程分支中的我的更新到他们的本地主服务器?

推荐答案

要从本地master推送到其他远程branch,请使用:

To push from your local master to a different remote branch, use:

git push origin master:branch

要让您的朋友将此远程branch拉入本地master,他们可以将git pull用作:

To have your friends pull this remote branch into their local master, they can use git pull as:

git checkout master
git pull origin branch

这篇关于Git将本地主服务器推送到远程特定分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆