致命的:错误的缺省修订版本'HEAD' [英] fatal: bad default revision 'HEAD'
问题描述
我使用GIT作为我的源代码管理系统。我们已经将它安装在我们的一个Linux机器上。 Tortoise GIT是我的Windows客户端。
今天早上我检查了一些变化,并标记了代码。然后,我将本地存储库推送到远程存储库。
当我到unix机箱上的存储库并键入 git log
我得到:
致命错误:缺省修订版本'HEAD'
但是当我使用我的窗口显示日志
tortoiseGit
客户端历史记录可以很好地显示出来......
---
SHA-1:f879573ba3d8e62089b8c673257c928779f71692
初始代码丢失
---
主起源/主oms-phase4-v1.0.0
SHA- 1:56176dbe45e6175b18c9f44533828806c63142ab
OMS阶段4 - 增加了OMS Cust。订单编号到EDI购买订单标题屏幕
标签信息
对象56176dbe45e6175b18c9f44533828806c63142ab
类型提交
标记oms-phase4-v1.0.0
tagger Richard Riviere< richard.riviere@myer.com.au> 1364338495 +1100
---
SHA-1:0000000000000000000000000000000000000000
工作目录更改
0更改文件
- -
代码已经被推送到远程仓库。
有人知道我为什么收到 fatal:bad default revision 'HEAD'
?
ps这是一个裸仓库,但是我已经创建了其他裸仓库,但没有这个问题。 你的仓库是你的,是什么继续进行它完全是你的业务,直到你推动或(允许)获取或克隆。当你删除你的windows repo时 - 该文件夹并不代表你本地的repo,它是你实际的本地repo,你删除了它从未被推送,抓取或克隆的所有内容。
编辑: 啊,好的,我想我会看到这里发生了什么:您推到了您的linux回购站,但它不是光秃秃的, 。
代替 git log
,请执行 git log --all
。或 git checkout
some-branch-name
。
然后尝试在您的Linux机器上本地克隆回购;我敢打赌,它的工作。你用什么来为你的回购在Linux上?尝试进入它的.git目录,然后 git daemon --base-path =。 --export-all
,如果那只是在那里,然后去你的窗口框,并尝试 git clone git://your.linux.box.ip $ c $如果守护进程抱怨它无法绑定,则向守护进程调用和
>到克隆网址。:54345
-port = 54345
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.
Your repo is yours, what goes on in it is entirely your business until you push or (allow a) fetch or clone. When you deleted your windows repo -- that folder didn't represent your local repo, it was your actual local repo, you deleted everything done in it that was never pushed, fetched or cloned.
edit: Ah, okay, I think I see what's going on here: you pushed to your linux repo but it's not bare and you never worked in it.
Instead of git log
, do git log --all
. Or git checkout
some-branch-name
.
Then try cloning the repo locally, on your linux box; I bet it works. What are you using to serve your repo on linux? Try cd'ing into its .git directory and git daemon --base-path=. --export-all
, if that just sits there then go to your windows box and try git clone git://your.linux.box.ip
, if the daemon complains it can't bind add --port=54345
to the daemon invoke and :54345
to the clone url.
这篇关于致命的:错误的缺省修订版本'HEAD'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!