Re: What commands can and can not be used with bare repositories?
- From
- J. Bruce Fields <bfields@fieldses.org>
- Date
- Dec 31, 2006, 01:57 UTC
- Message-ID
- <20061231015728.GB20348@fieldses.org>
- In-Reply-To
- <E1H0poE-0000qd-Ee@candygram.thunk.org>
On Sat, Dec 30, 2006 at 08:48:22PM -0500, Theodore Ts'o wrote:
Show 11 quoted lines
> 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.