From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: Victor Porton <porton@narod.ru>
Cc: git@vger.kernel.org
Subject: Re: [Bug] Misleading error message when run in a non-Git directory
Date: Thu, 23 Apr 2020 23:26:22 +0000 [thread overview]
Message-ID: <20200423232622.GK6465@camp.crustytoothpaste.net> (raw)
In-Reply-To: <c0e916fb-7b0e-1192-e71d-ea6449863e9b@narod.ru>
[-- Attachment #1: Type: text/plain, Size: 773 bytes --]
On 2020-04-23 at 22:42:25, Victor Porton wrote:
> git remote add origin ...
>
> produces the error
>
> fatal: remote origin already exists.
>
> when run in the directory which is not initialized by Git (has no .git
> folder).
>
> This error message is misleading.
I don't see this, using a reasonably up-to-date version of next. What I
see is the following:
$ git remote add origin foo
fatal: not a git repository (or any of the parent directories): .git
Are you running this in a directory under your home directory? If so,
is your home directory a repository?
If not, can you tell us what running "git rev-parse --show-toplevel" in
that directory prints?
--
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 263 bytes --]
prev parent reply other threads:[~2020-04-23 23:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-23 22:42 [Bug] Misleading error message when run in a non-Git directory Victor Porton
2020-04-23 23:26 ` brian m. carlson [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=20200423232622.GK6465@camp.crustytoothpaste.net \
--to=sandals@crustytoothpaste.net \
--cc=git@vger.kernel.org \
--cc=porton@narod.ru \
/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).