threads / discuss / 29641

importance of .git extension for bare repos

Subject: importance of .git extension for bare repos

## tl;dr

3 messages between Feb 16, 2012 and Feb 16, 2012.

replies: 2people: 3as markdown or json

Neal Kreitzinger· Feb 16, 2012, 01:04 UTC · lore

I have a user who has created bare repos without naming them with the .git extension. As a result, the file paths are MYBARE/config instead of MYBARE.git/config, etc. Is this a supported naming convention for bare repos in git.git, or is it going to have some problems?

v/r, neal

Tay Ray Chuan· Feb 16, 2012, 01:38 UTC · re: Neal Kreitzinger · lore

Re: importance of .git extension for bare repos

I don't believe its significant to git itself, it's just a convention for us humans.

-- 
Cheers,
Ray Chuan


On Thu, Feb 16, 2012 at 9:04 AM, Neal Kreitzinger <neal@rsss.com> wrote:
> I have a user who has created bare repos without naming them with the .git
> extension.  As a result, the file paths are MYBARE/config instead of
> MYBARE.git/config, etc.  Is this a supported naming convention for bare
> repos in git.git, or is it going to have some problems?
>
> v/r,
> neal
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jeff King· Feb 16, 2012, 02:30 UTC · re: Tay Ray Chuan · lore

Re: importance of .git extension for bare repos

On Thu, Feb 16, 2012 at 09:38:08AM +0800, Tay Ray Chuan wrote:
> I don't believe its significant to git itself, it's just a convention
> for us humans.

That's not entirely true. If you try to access a repository by name (e.g., "git clone foo", "git fetch foo"), git will look for "foo.git". This magic lookup works for local repositories, and for remote repositories served over ssh or by git-daemon. I think it should also work for smart-http, but I didn't check. It doesn't work for dumb http (because it would involve making several exploratory http requests).

-Peff

← back to recent threads