git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git show on bare repository?

From
Sskillzero@gmail.com <skillzero@gmail.com>
Date
Aug 2, 2009, 03:51 UTC
Message-ID
<2729632a0908012051i28654bb7m418ff2ed00138815@mail.gmail.com>

I could have sworn I used to be able to use git show to display the contents of a file from the server, but now it always says this (if I use -- then it doesn't show anything):

fatal: ambiguous argument 'master:file.txt': unknown revision or path not in the working tree. Use '--' to separate paths from revisions

What I'm trying to do is allow people to get a single file without having to clone the entirely repository, like this:

ssh git.example.com "cd /MyRepo.git && git show master:File.txt"

If I do this with a non-bare repository, it works. The server is running git version 1.6.3.2 (I'm running 1.6.4 locally where it works).

Next: Jeff King
Message 1 of 3 in “git show on bare repository?”
  1. skillzero@gmail.comAug 2, 2009
  2. Jeff KingAug 2, 2009
  3. skillzero@gmail.comAug 2, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.