从一个分离的头部推动git推动 [英] making a git push from a detached head

查看:69
本文介绍了从一个分离的头部推动git推动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一个孤立的头上,做了一些改变。我想用git把这些改成这个独立的头。我不希望我的更改进入开发分支,当然不在主分支上。我正在与另一个人一起处理文件。



示例分支

  develop 
master
*(HEAD在原产地/ 49792_testMocha分离)

如何在不影响开发或主?

解决方案

使用创建新分支git checkout -b BRANCH_NAME



然后将新分支推送到远程: git push origin BRANCH_NAME


I am on a detached head and made some changes. I want to push up these changed to this detached head with git. I do not want my changes to go onto the develop branch and certainly not on the master branch. I am working on a file with another individual.

Example branches

   develop
   master
   *(HEAD detached at origin/49792_testMocha)

How do I push into head without affecting develop or master?

解决方案

Create a new branch using git checkout -b BRANCH_NAME

Then push the new branch to remote: git push origin BRANCH_NAME

这篇关于从一个分离的头部推动git推动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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