Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm using GIT as my source control system. We have it installed on one of our Linux boxes. Tortoise GIT is my windows client.

This morning I checked in some changes, and tagged the code. I then did a push of my local repository to the remote repository.

When I go to my repository on the unix box and type in git log I get:

fatal: bad default revision 'HEAD'

But when I do a show log using my windows tortoiseGit client the history comes up nicely as per below...

---
SHA-1: f879573ba3d8e62089b8c673257c928779f71692

Initial drop of code

---
master origin/master oms-phase4-v1.0.0
SHA-1: 56176dbe45e6175b18c9f44533828806c63142ab

OMS Phase 4 - Added OMS Cust. Order No. to EDI Purchase Order Header screens

Tag Info

object 56176dbe45e6175b18c9f44533828806c63142ab
type commit
tag oms-phase4-v1.0.0
tagger Richard Riviere <richard.riviere@myer.com.au> 1364338495 +1100

---
SHA-1: 0000000000000000000000000000000000000000

Working dir changes
0 files changed

---

The code has definitely been pushed to the remote repository. I've been able to check by cloning the repository into a different directory.

Does anyone know why I am receiving the fatal: bad default revision 'HEAD'?

p.s. It is a bare repository however I have created other bare repositories which have not had this problem.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
1.2k views
Welcome To Ask or Share your Answers For Others

1 Answer

just do an initial commit and the error will go away:

git commit -m "initial commit"

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...