git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Randall S. Becker" <rsbecker@nexbridge.com>
To: "'Stefan Beller'" <sbeller@google.com>, "'Kyle Meyer'" <kyle@kyleam.com>
Cc: <git@vger.kernel.org>
Subject: RE: What's the ".git/gitdir" file?
Date: Tue, 27 Oct 2015 18:42:48 -0400	[thread overview]
Message-ID: <017901d11108$ceb2cd10$6c186730$@com> (raw)
In-Reply-To: <CAGZ79ka0XvmvVpX5WrpeEBXBWKA41RTZm4p7q=QtUTFy18hkoA@mail.gmail.com>

-----Original Message-----
On Tue, October-27-15 6:23 PM, Stefan Beller wrote:
>On Tue, Oct 27, 2015 at 3:04 PM, Kyle Meyer <kyle@kyleam.com> wrote:
>> When a ".git" file points to another repo, a ".git/gitdir" file is 
>> created in that repo.
>>
>> For example, running
>>
>>     $ mkdir repo-a repo-b
>>     $ cd repo-a
>>     $ git init
>>     $ cd ../repo-b
>>     $ echo "gitdir: ../repo-a/.git" > .git
>>     $ git status
>>
>> results in a file "repo-a/.git/gitdir" that contains
>>
>>     $ cat repo-a/.git/gitdir
>>     .git
>>
>> I don't see this file mentioned in the gitrepository-layout manpage, 
>> and my searches haven't turned up any information on it.  What's the 
>> purpose of ".git/gitdir"?  Are there cases where it will contain 
>> something other than ".git"?
>
>It's designed for submodules to work IIUC.
>
>Back in the day each git submodule had its own .git directory keeping its local >objects.

>Nowadays the repository of submodule <name> is kept in the superprojects >.git/modules/<name> directory.

Slightly OT: Is there any way of avoiding having that file in the first place? I'm hoping to have a git repository in a normal file system (Posix) and a working area in a rather less-than-normal one where dots in file names are bad (actually a dot is a separator).

Cheers,
Randall

  reply	other threads:[~2015-10-27 22:48 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-27 22:04 What's the ".git/gitdir" file? Kyle Meyer
2015-10-27 22:22 ` Stefan Beller
2015-10-27 22:42   ` Randall S. Becker [this message]
2015-10-27 22:54     ` Stefan Beller
2015-10-27 22:54 ` Junio C Hamano
2015-10-27 23:26   ` Mike Rappazzo
2015-10-28 16:23     ` Junio C Hamano
2015-11-02 19:08       ` [PATCH] setup: do not create $X/gitdir unnecessarily when accessing git file $X Nguyễn Thái Ngọc Duy
2015-11-02 20:01         ` Eric Sunshine
2015-11-02 20:35         ` Jeff King
2015-11-02 20:51           ` Junio C Hamano
2015-11-02 20:52             ` Jeff King
2015-11-03  5:48             ` Duy Nguyen
2015-11-03 19:54               ` Junio C Hamano
2015-12-27  3:43                 ` [PATCH] worktree: stop supporting moving worktrees manually Nguyễn Thái Ngọc Duy
2015-12-28  6:22                   ` Eric Sunshine
2015-12-29 13:55                     ` Duy Nguyen
2015-12-31  5:59                       ` Eric Sunshine

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='017901d11108$ceb2cd10$6c186730$@com' \
    --to=rsbecker@nexbridge.com \
    --cc=git@vger.kernel.org \
    --cc=kyle@kyleam.com \
    --cc=sbeller@google.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).