我的git分支在Sourcetree中显示'origin / master'和'origin / HEAD',我不知道如何合并这两个 [英] My git branch is showing 'origin/master' and 'origin/HEAD' in Sourcetree and I don't know how to merge the two

查看:1849
本文介绍了我的git分支在Sourcetree中显示'origin / master'和'origin / HEAD',我不知道如何合并这两个的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近合并了一个我正在和'master'分支合作的分支。当推或拉创建一个 origin / master 和一个 origin / HEAD 时,我必须有(还有一种git n00b) code>分支。不幸的是,我没有记录下我执行过的命令。目前,我的团队在他们的主副本中有一堆代码,当我检出项目时(即使我将 clone 复制到新位置),我也没有收到代码。



以下是Sourcetree展示的屏幕截图:



我真的需要解决这个问题,所以我可以继续工作,所以任何帮助将不胜感激。

解决方案

它只是一个指向master的指针,如果你愿意的话,它是一个符号链接。您可以通过在终端中执行以下操作来安全地删除它(或针对Windows用户的git bash / cygwin):


  1. 导航到您的存储库

  2. 执行: git remote set-head origin -d


$

  $ git分支-r 
原点/主
$ p

现在它应该消失: $ b


I recently merged a branch I was working on with the 'master' branch. I must have (still kind of a git n00b) done something when pushing or pulling that created both an origin/master and an origin/HEAD branches. Unfortunately, I didn't keep a record of what commands I ran that did this. Currently, my team has a bunch of code in their master copies that I'm not getting when I check out the project (even if I clone to a new location).

Here's a screenshot of what Sourcetree is showing:

I really need to get this resolved so I can keep working so any help will be greatly appreciated.

解决方案

It is just a pointer to master, a symbolic link if you wish. You can safely delete it by doing the following in a terminal (or git bash/cygwin for windows users):

  1. navigate to your repository
  2. execute: git remote set-head origin -d

now it should be gone:

$ git branch -r
origin/master

这篇关于我的git分支在Sourcetree中显示'origin / master'和'origin / HEAD',我不知道如何合并这两个的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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