From: Tim Visher <tim.visher@gmail.com>
To: Jeff King <peff@peff.net>
Cc: Ramkumar Ramachandra <artagnon@gmail.com>,
Git Mailing List <git@vger.kernel.org>
Subject: Re: Getting rid of a stale remote?
Date: Thu, 8 Apr 2010 22:08:35 -0400 [thread overview]
Message-ID: <m2nc115fd3c1004081908t15ee034bha4909b56621b4936@mail.gmail.com> (raw)
In-Reply-To: <20100406184256.GA14281@coredump.intra.peff.net>
On Tue, Apr 6, 2010 at 2:42 PM, Jeff King <peff@peff.net> wrote:
> On Tue, Apr 06, 2010 at 02:25:07PM -0400, Tim Visher wrote:
>> $ git remote rm d
>> error: Could not remove config section 'remote.d'
>
> And this fails because you have no configured remote 'd', just the
> crufty branch. How you got into that state, I don't know, but I imagine
> it was from deleting the config in .git/config manually instead of using
> "git remote rm" in the first place.
%<---lengthy but almost assuredly misleading explanation of how I got there--->%
So I had this long explanation but I realized that it probably wasn't
the case. If I ever run into this again I'll try to be more aware of
what I did. I suspect though that it's when I want to make one remote
my origin and make origin something else…
> It would be tempting to say that "git remote rm" should continue if the
> config simply doesn't exist and remove the crufty branch, but that is
> not quite right. We actually need the config to tell us "here is where
> we store the tracking branches for remote d". Of course, unless you have
> munged the config manually, it will always be "refs/remotes/d". So we
> could perhaps guess that for the case of missing config (possibly with
> "git remote rm -f" or something).
That sounds quite sensible to me. Also, a message along the lines of:
You are trying to delete a remote for which there is no config section. (We
discovered a remote X in refs/remotes/X) and deleted it.|No remote X in
refs/remotes/X. Did you store it elsewhere?) In the future, use `git
remote` to alter your remotes
> But if you just want to do things manually, try "git branch -d -r
> d/branch".
That did indeed work like a charm. Thanks so much.
--
In Christ,
Timmy V.
http://burningones.com/
http://five.sentenc.es/ - Spend less time on e-mail
prev parent reply other threads:[~2010-04-09 2:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-06 18:03 Getting rid of a stale remote? Tim Visher
2010-04-06 18:07 ` Ramkumar Ramachandra
2010-04-06 18:25 ` Tim Visher
2010-04-06 18:42 ` Jeff King
2010-04-09 2:08 ` Tim Visher [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2nc115fd3c1004081908t15ee034bha4909b56621b4936@mail.gmail.com \
--to=tim.visher@gmail.com \
--cc=artagnon@gmail.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).