问题描述
我最近合并了一个我正在和'master'分支合作的分支。当推或拉创建一个时,我必须有(还有一种git n00b) code>分支。不幸的是,我没有记录下我执行过的命令。目前,我的团队在他们的主副本中有一堆代码,当我检出项目时(即使我将 clone 复制到新位置),我也没有收到代码。
以下是Sourcetree展示的屏幕截图:
我真的需要解决这个问题,所以我可以继续工作,所以任何帮助将不胜感激。
它只是一个指向master的指针,如果你愿意的话,它是一个符号链接。您可以通过在终端中执行以下操作来安全地删除它(或针对Windows用户的git bash / cygwin):
- 导航到您的存储库
- 执行: 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):
- navigate to your repository
- execute: git remote set-head origin -d
now it should be gone:
$ git branch -r origin/master
这篇关于我的git分支在Sourcetree中显示'origin / master'和'origin / HEAD',我不知道如何合并这两个的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!