Re: What is the idea for bare repositories?
- From
David Kastrup <dak@gnu.org>
- Date
- Nov 12, 2007, 16:17 UTC
- Message-ID
- <86pryf7815.fsf@lola.quinscape.zz>
- In-Reply-To
- <20071112131927.GA1701@c3sl.ufpr.br>
Bruno Cesar Ribas <ribas@c3sl.ufpr.br> writes:
Show 14 quoted lines
> A bare repository is the way to publish your changes to the public. > git-daemon and http-clones use a bare repository that only contains > adminsitrative files. > > From man page > --bare Make a bare GIT repository. That is, instead of creating > <directory> and placing the administrative files in > <directory>/.git, make the <directory> itself the $GIT_DIR. This > obviously implies the -n because there is nowhere to check out > the working tree. Also the branch heads at the remote are copied > directly to corresponding local branch heads, without mapping > them to refs/remotes/origin/. When this option is used, neither > remote-tracking branches nor the related configuration variables > are created.
Fine. So why don't the following commands complain? Apart from git-reset without arguments (which could probably get along without a working dir), they are supposed to employ a working directory.
Show 9 quoted lines
> On Mon, Nov 12, 2007 at 02:11:58PM +0100, David Kastrup wrote: >> >> I have a repository declared as bare. Some commands treat it as such, >> other's don't. For example, I get >> >> git-diff [no complaint] >> git-reset [no complaint] >> git-reset --hard >> HEAD is now at db862c1... installmanager.sh: setze GIT_WORK_TREE
-- David Kastrup