Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8209231
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T09:39:05+00:00 2026-06-07T09:39:05+00:00

On my server, I host some bare git repositories that I’m working on. I’d

  • 0

On my server, I host some bare git repositories that I’m working on. I’d like to display some basic statistics about each repository on my website; for now, let’s just say I want to do simple stuff like listing all the files in the repository. On a non-bare git repository, this can be done with

git ls-files

but for bare repositories this (and most other git commands) don’t work. I’m sure there’s probably a simple way of doing this particular command, but I’ll probably want to show some complicated/project-specific stats for different repositories, so I’m really asking if there’s a way to execute any/all git commands on a bare repository without have to make a temporary clone or something convoluted like that. I suspect there’s some command parameter I need to set, but I haven’t been able to figure out which one yet.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T09:39:07+00:00Added an answer on June 7, 2026 at 9:39 am

    You can run this one:

    git ls-tree -r HEAD --name-only
    

    Obviously you have to specify a branch or reference, because there is no working tree or index in a bare repository.

    I don’t know for other commands but you can actually do most of them in a bare repository, but those that require a working tree.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I host a small development server on my system. From that working directory I
I currently maintain a server that host multiple Subversion repositories. On an other server
I have to display current server host (in PHP, but it is not very
I was to setup an SSH Server to Host my Git Repository to my
I'm using VisualSVN Server to host an SVN repo, and for some automation work,
I am running Windows Server 2003 host OS. On that I have Windows Virtual
I have a database server on host A, and some applications also on host
I have Microsoft SQL Server 2008 which we host some databases on. We currently
During a server start-up procedure, I access a remote host for some initialisation data.
I have an HTTP server which host some large file and have python clients

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.