Re: GIT - error: no such remote ref refs/heads/TestBranch

2 messages, 2 authors, 2016-08-11 · open the first message on its own page

Re: GIT - error: no such remote ref refs/heads/TestBranch

From: Junio C Hamano <hidden>
Date: 2016-08-11 19:41:31

"Sean Kelley" [off-list ref] writes:
Hi,

I was wondering if someone could help me.  I had a branch on our
remote GIT server called TestBranch.  I logged into the Remote server
and ran:

<from remote server>
git branch -D TestBranch

But in my local clone:

kelleys@oifig:~/Work/kernel$ git pull origin
kelleys@git.example.com's password:
error: no such remote ref refs/heads/TestBranch
Fetch failure: git+ssh://git.example.com/data/git/proj/kernel/mh.git
kelleys@oifig:~/Work/kernel$

Any ideas how to correct this?
If you know remote does not have it, then probably not fetching
from it would be a good idea.

Look at your local $GIT_DIR/remotes/origin (or [remote "origin"]
section in $GIT_DIR/config) and remove the refspec that tells
git to fetch it.

In $GIT_DIR/remotes/origin, you may want to remove a like like this:

	Pull: refs/heads/TestBranch:<something>

If it is coming from $GIT_DIR/config, it would probably look
like:

	[remote "origin"]
        	fetch = refs/heads/TestBranch:<something>

and you would want to remove the "fetch = " line.

Re: GIT - error: no such remote ref refs/heads/TestBranch

From: Carl Worth <hidden>
Date: 2016-08-11 19:55:11

On Tue, 19 Dec 2006 14:06:03 -0800, Junio C Hamano wrote:
"Sean Kelley" [off-list ref] writes:
quoted
error: no such remote ref refs/heads/TestBranch
Fetch failure: git+ssh://git.example.com/data/git/proj/kernel/mh.git
kelleys@oifig:~/Work/kernel$

Any ideas how to correct this?
If you know remote does not have it, then probably not fetching
from it would be a good idea.
I think a common case is just wanting to track the upstream contents,
whether branches appear or disappear, and being able to do that
without manually maintaining a local configuration file listing the
current remote branches.

Presumably the recently added globbing support would provide that
ability, correct?

Is there any plan to make git-clone take advantage of this capability
so that one can track an upstream that has branches that get
added/remove without having to learn how to manually maintain the
current list of branches in .git/config ?

-Carl
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help