git检查一个分支,然后使该分支头/主 [英] git checkingout a branch then make that branch to head/master

查看:107
本文介绍了git检查一个分支,然后使该分支头/主的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我做了最近的提交并将其推送到了我的私有存储库,那么您如何返回要检出的分支,然后将其推送到存储库的头部/主服务器?

  git checkout branch_name 

和我需要做什么命令来将这个branch_name移动到master / head?

解决方案

本地changes.use

git fetch



git pull

git checkout {目标分支名称}



与主人合并

git merge origin / master


Let's say I made the most recent commit and pushed it to the my private repository, how do you go back to the branch you want to checkout and then push it to the head/master of the repository??

git checkout branch_name

and what command do I have to do to move that branch_name to the master/head ?

解决方案

After commit and push your local changes.use

git fetch

git pull

git checkout {target branch name }

To merge with master

git merge origin / master

这篇关于git检查一个分支,然后使该分支头/主的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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