threads / discuss / 60693

git config --global needs to be run in a git directory

Subject: git config --global needs to be run in a git directory

## tl;dr

2 messages between Jan 7, 2024 and Jan 7, 2024.

replies: 1people: 1as markdown or json

Trix Knotts· Jan 7, 2024, 05:56 UTC · lore
Hi! This is a minor issue, but I noticed when I ran `git config --global` from my home directory it gave me this error: `fatal: not in a git directory`. I was able to resolve this simply by moving to a git directory on my machine and rerunning it, so it is not really a big issue. However, I think for convenience it would be nice to be able to run global things like this anywhere. What do y'all think? Would this be easy to change?
BTW this is my first time emailing the git mailing list, so sorry if I did something wrong. Please let me know if so!

-- Trix Knotts (she/they)

Trix Knotts· Jan 7, 2024, 07:14 UTC · re: Trix Knotts · lore

Re: git config --global needs to be run in a git directory

My bad, I had `--global` after the item to be configured. -- Trix Knotts (she/they)

Jan 6, 2024, 11:56 PM by enderk@tuta.io:
Show 7 quoted lines
> Hi! This is a minor issue, but I noticed when I ran `git config --global` from my home directory it gave me this error: `fatal: not in a git directory`. I was able to resolve this simply by moving to a git directory on my machine and rerunning it, so it is not really a big issue. However, I think for convenience it would be nice to be able to run global things like this anywhere. What do y'all think? Would this be easy to change?
>
> BTW this is my first time emailing the git mailing list, so sorry if I did something wrong. Please let me know if so!
>
> --
> Trix Knotts (she/they)
>

← back to recent threads