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

  • Home
  • SEARCH
  • 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 6020571
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:35:17+00:00 2026-05-23T03:35:17+00:00

I created a bare repository on a file-server in my local network at home.

  • 0

I created a bare repository on a file-server in my local network at home.
After this i pushed a branch of an existing repository from my desktop-pc to this new remote repository.

Pushing worked perfectly and it seems, that all data arrived (a “git branch -va” gives me the correct data).
But i cannot use git log or git show on the bare repository.
i get an:

fatal: bad default revision 'HEAD'

or simply no output

is this normal for bare repositories? Is there another possibility to visualize everything?

Edit:
The fatal error is solved now, but i receive no output from “git log” or “git log unstable”. Same command on the desktop-pc works perfectly

  • 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-05-23T03:35:17+00:00Added an answer on May 23, 2026 at 3:35 am

    Yes, this is normal for new bare (and non-bare) repositories.

    Explanation

    HEAD is what Git calls a symbolic reference—a reference to another reference.

    In non-bare repositories, HEAD normally indicates which branch is currently checked out. A new commit will cause the branch named by HEAD to be advanced to refer to the new commit. When HEAD refers to a commit object directly instead of a branch, it’s considered to be detached, meaning further commits will not cause a branch reference to be advanced to refer to the new commits (dangerous because checking out a different commit or branch will render the new commits unreachable by any existing reference, making them hard to find and subject to garbage collection).

    In bare repositories, HEAD indicates the repository’s default branch, so that in a clone of the repository git checkout origin is equivalent to git checkout origin/master if master is the default branch (see git help rev-parse for details).

    When Git initializes a new repository, it initializes HEAD to refer to refs/heads/master (in other words, HEAD points to the master branch by default). However, it does not create a branch named master because there are no commits in the repository for master to point to yet.

    So until you either create a master branch or change HEAD to point to a branch that does exist, you’ll get that error when you run a command that looks at HEAD (such as git log or git show without any arguments).

    You can still use commands that don’t examine HEAD. For example:

    git log some_branch_that_exists
    

    Fix

    To get rid of the error message, you can do one of the following:

    • Change HEAD to point to a branch that does exist:

      git symbolic-ref HEAD refs/heads/some_other_branch
      
    • Push a new master branch into the repository from somewhere else
    • Create a new master branch locally:

      git branch master some_existing_commit
      

    Visualization

    To visualize everything in the repository, I use something like this:

    git log --graph --oneline --date-order --decorate --color --all
    

    Note that the above command will work even if HEAD is pointing to a non-existent branch.

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

Sidebar

Related Questions

I've created a bare git repository (Core), cloned from a pre-existing repo (Production) using
I'm trying to synchronize periodically a git bare repository, my local branches are created
I have a remote server on which I have created a bare git repository.
I've created a bare (central) repository on a windows machine. My colleagues and myself
I created a bare repo to publish my repository, but I can't figure out
I have a remote tracking branch tracked locally in my local repository using 'git
I have a bare repository at /home/dan/repo/ and a working copy at /home/dan/www/project/ .
I got this scenario: I created a Git repository. $ git init Cloned an
In order to synchronize my repositories with Wuala I created a new bare repository
I have created a remote bare repository: cd ~ mkdir -p git/foto-fiori.git cd git/foto-fiori.git

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.