Re: What commands can and can not be used with bare repositories?

From: J. Bruce Fields <bfields@fieldses.org>
Date: 2006-12-31 12:57:28
On Sat, Dec 30, 2006 at 08:48:22PM -0500, Theodore Ts'o wrote:
> What isn't documented is what commands actually can deal with a bare
> repository.  At the moment, it looks like a bare repository can be a
> target of a git pull, push, and merge commands, and it can be a source
> for a git clone, but that seems to be about it.  All other commands,
> such as "git log" blow up with the error message "Not a git repository".
> This to me seems a bit lame, since why isn't a "bare repository" also a
> "git repository"?  All of the information is there for "git log" to
> work.  Commands that require a working directory obviously can't work,
> but there are plenty of git commands for which there's no reason why
> they shouldn't be able to operate on a bare repository.  For example,
> "git repack", "git log", "git fetch", etc.

Yup.  Anything that should work actually does; you just need to know to
use one of:

	GIT_DIR=. git log
	git --git-dir=. log
	git --bare log

Why git couldn't figure this out for you, I don't know....

--b.
-
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
Received on Sun Dec 31 12:58:22 2006

This archive was generated by hypermail 2.1.8 : 2006-12-31 13:02:44 EST