* [Bug] Misleading error message when run in a non-Git directory
@ 2020-04-23 22:42 Victor Porton
2020-04-23 23:26 ` brian m. carlson
0 siblings, 1 reply; 2+ messages in thread
From: Victor Porton @ 2020-04-23 22:42 UTC (permalink / raw)
To: git
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.
git --version
git version 2.20.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Bug] Misleading error message when run in a non-Git directory
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
0 siblings, 0 replies; 2+ messages in thread
From: brian m. carlson @ 2020-04-23 23:26 UTC (permalink / raw)
To: Victor Porton; +Cc: git
[-- 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 --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-04-23 23:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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).