我的情况是这样......在同一个仓库工作的人从他的本地和远程仓库中删除了一个分支......
大多数在Stack Overflow或其他网站上询问此类问题的人都会git branch -a在其底部的远程跟踪分支列表中显示分支问题:
* master
develop
feature_blah
remotes/origin/master
remotes/origin/develop
remotes/origin/feature_blah
remotes/origin/random_branch_I_want_deleted
Run Code Online (Sandbox Code Playgroud)
但是,在我的情况下,不应该在那里的分支是本地的:
* master
develop
feature_blah
random_branch_I_want_deleted
remotes/origin/master
remotes/origin/develop
remotes/origin/feature_blah
Run Code Online (Sandbox Code Playgroud)
当我执行以下任何操作时,它不会在本地删除:
$ git prune
Run Code Online (Sandbox Code Playgroud)
我也尝试过:
$ git remote prune origin
$ git fetch --prune
Run Code Online (Sandbox Code Playgroud)
更有用的信息:当我检查git remote show origin它是如何看起来:
* remote origin
Fetch URL: utilities:homeconnections_ui.git
Push URL: utilities:homeconnections_ui.git
HEAD branch: master
Remote branches:
master tracked
develop tracked
feature_blah tracked
other123 tracked
other444 tracked
other999 tracked
Local branches configured for 'git pull':
develop merges with remote …Run Code Online (Sandbox Code Playgroud) 这是不可能在服务器上的repo中创建somme子子文件夹?
如果我做:
git push origin dev/master
Run Code Online (Sandbox Code Playgroud)
一切工作找到
但如果我这样做
git push origin dev/sub/master
Run Code Online (Sandbox Code Playgroud)
我懂了:
error: 'refs/heads/dev/sub' exists; cannot create 'refs/heads/dev/sub/master'
Run Code Online (Sandbox Code Playgroud)
我用"git branch -r"检查并直接用ssh检查,没有创建dev/sub文件夹.
怎么了?
我正在尝试在我的Ubuntu guest上的当前分支上创建一个分支.不幸的是我一直收到这个错误:
git checkout -b origin/feature/IF-53-change-validation-window/Tommaso
fatal: cannot lock ref 'refs/heads/origin/feature/IF-53-change-validation-window/Tommaso':
'refs/heads/origin/branch' exists;
cannot create 'refs/heads/origin/branch/Tommaso'
Run Code Online (Sandbox Code Playgroud)
我尝试git gc --prune=now了这里建议链接,但不断得到相同的错误.