Git reporting "Not a git repository" [message #10999] |
Sun, 26 July 2009 01:19  |
Eclipse User |
|
|
|
After I tried using eGit to fetch from GitHub to my WinVista laptop, the
Cygwin git status & fsck commands report:
fatal: Not a git repository (or any of the parent directories): .git
The contents of the .git directory look generally OK:
COMMIT_EDITMSG HEAD branches index objects remotes
FETCH_HEAD ORIG_HEAD config logs refs
is there another diagnostic or repair I can try?
Unfortunately, I have some code on my laptop, so I'm reluctant to blow
the repo away and start over.
Thanks for any guidance!
John
|
|
|
|
|
|
|
|
Re: Git reporting "Not a git repository" [message #468017 is a reply to message #467988] |
Mon, 03 August 2009 11:40  |
Eclipse User |
|
|
|
Sorry that I can't reconstruct steps that produce this situation. As
Shawn suspects, the HEAD is incorrect (and contains HEAD). I'm fairly
certain this was caused by my attempt to use the "Fetch From" command.
Perhaps it's worth noting that when I clone (and fetch), I'm specifying
a branch other than 'master'. I've noticed that my local repo sometimes
loses the tracking branch for master, so it's likely that it was in
that state at the time that I tried to fetch. To be clear, I've not
experienced any problem immediately after a straight clone.
Please let me know if you'd like to have a defect recorded given that I
don't have any more information than what I've stated above.
Thanks!
John
Shawn Pearce wrote:
> John wrote:
>> Thanks, Matthias! The repository turned out to be unusable by Egit as
>> well (see below)
> ...
>> Exceeded maximum ref depth of 5 at HEAD. Circular reference?
>>
>> java.io.IOException: Exceeded maximum ref depth of 5 at HEAD.
>> Circular reference?
>> at org.spearce.jgit.lib.RefDatabase.readRefBasic(RefDatabase.ja va:332)
>
> *sigh*
>
> Apparently the HEAD reference was in a cycle, which is why C Git also
> didn't want to touch this repository. Not sure how that happened on
> clone within EGit, but it did, and its a bug in EGit's CloneOp.
>
> Usually an easy way to fix this is:
>
> echo 'ref: refs/heads/master' >.git/HEAD
>
> though you shouldn't ever have to do that.
|
|
|
Re: Git reporting "Not a git repository" [message #573731 is a reply to message #10999] |
Tue, 28 July 2009 08:04  |
Eclipse User |
|
|
|
Well, nobody yet answered, let me try..
I had been encountering similar problems when started to use Git (couple
months ago). I did not remember what was the cause of this problem. I
suppose that was because everething was new...
I remember I had installed newer version of Git using Cygwin setup (just
as a possible solution. Once again, I don't remember whether this helped
or not).
What is the version you use?
Dmitry
|
|
|
Re: Git reporting "Not a git repository" [message #573746 is a reply to message #10999] |
Tue, 28 July 2009 13:36  |
Eclipse User |
|
|
|
John wrote:
> After I tried using eGit to fetch from GitHub to my WinVista laptop, the
> Cygwin git status & fsck commands report:
> fatal: Not a git repository (or any of the parent directories): .git
> The contents of the .git directory look generally OK:
> COMMIT_EDITMSG HEAD branches index objects remotes
> FETCH_HEAD ORIG_HEAD config logs refs
> is there another diagnostic or repair I can try?
Which version of EGit and git on cygwin did you use ?
From which path did you run git status ?
Did you try using msysgit instead of cygwin ?
Matthias
|
|
|
Re: Git reporting "Not a git repository" [message #573766 is a reply to message #369121] |
Sun, 02 August 2009 13:29  |
Eclipse User |
|
|
|
Matthias Sohn wrote:
> John wrote:
>
> Which version of EGit and git on cygwin did you use ?
The repository that no longer works was last updated by the 'release'
build of Egit at 0.4.9. I'd previously updated it with a a variety of
'integration build' versions. The Cygwin git command reports 1.6.1.2; I
may have also tried 1.6.1.1 as I'm not sure when I updated the Cygwin
install.
> From which path did you run git status ?
The current working directory when I tried the Cygwin git status command
was the top-level of the working copy (containing the .git directory
that I listed in my earlier post.
> Did you try using msysgit instead of cygwin ?
I haven't tried msysgit.
>
> Matthias
Thanks, Matthias! The repository turned out to be unusable by Egit as
well (see below). I ended up cloning a fresh one and copying my changes
over. Good thing I push to a git-managed repository and don't rely too
heavily on Egit!
If I open the workspace containing the corrupted repository Egit
generates a series of errors:
eclipse.buildId=I20090611-1540
java.version=1.6.0_13
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments: -os win32 -ws win32 -arch x86
This is a continuation of log file C:\Users\IBM
User\ADS35Workspace\.metadata\.bak_0.log
Created Time: 2009-08-02 10:22:47.443
Error
Sun Aug 02 10:23:01 PDT 2009
Exceeded maximum ref depth of 5 at HEAD. Circular reference?
java.io.IOException: Exceeded maximum ref depth of 5 at HEAD. Circular
reference?
at org.spearce.jgit.lib.RefDatabase.readRefBasic(RefDatabase.ja va:332)
at org.spearce.jgit.lib.RefDatabase.readRefBasic(RefDatabase.ja va:337)
at org.spearce.jgit.lib.RefDatabase.readRefBasic(RefDatabase.ja va:337)
at org.spearce.jgit.lib.RefDatabase.readRefBasic(RefDatabase.ja va:337)
at org.spearce.jgit.lib.RefDatabase.readRefBasic(RefDatabase.ja va:337)
at org.spearce.jgit.lib.RefDatabase.readRefBasic(RefDatabase.ja va:337)
at org.spearce.jgit.lib.RefDatabase.readRefBasic(RefDatabase.ja va:273)
at org.spearce.jgit.lib.RefDatabase.readRef(RefDatabase.java:17 3)
at org.spearce.jgit.lib.Repository.resolveSimple(Repository.jav a:704)
at org.spearce.jgit.lib.Repository.resolve(Repository.java:697)
at
org.spearce.egit.ui.internal.decorators.DecoratableResourceA dapter. <init>(DecoratableResourceAdapter.java:87)
at
org.spearce.egit.ui.internal.decorators.GitLightweightDecora tor.decorate(GitLightweightDecorator.java:173)
at
org.eclipse.ui.internal.decorators.LightweightDecoratorDefin ition.decorate(LightweightDecoratorDefinition.java:263)
at
org.eclipse.ui.internal.decorators.LightweightDecoratorManag er$LightweightRunnable.run(LightweightDecoratorManager.java: 81)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at
org.eclipse.ui.internal.decorators.LightweightDecoratorManag er.decorate(LightweightDecoratorManager.java:365)
at
org.eclipse.ui.internal.decorators.LightweightDecoratorManag er.getDecorations(LightweightDecoratorManager.java:347)
at
org.eclipse.ui.internal.decorators.DecorationScheduler$1.ens ureResultCached(DecorationScheduler.java:371)
at
org.eclipse.ui.internal.decorators.DecorationScheduler$1.run (DecorationScheduler.java:331)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
|
|
|
Re: Git reporting "Not a git repository" [message #573781 is a reply to message #463660] |
Mon, 03 August 2009 05:09  |
Eclipse User |
|
|
|
> Matthias Sohn wrote:
> The repository that no longer works was last updated by the 'release'
> build of Egit at 0.4.9. I'd previously updated it with a a variety of
> 'integration build' versions.
Yeah, I also upgraded to this version on some stage. Perhaps, this is the
root cause.
Currently, the only incompatibility between Egit and Cygwin Git is the
executable bit of files, that Egit sets (not on purpose) when checking
out.
Cygwin Git reports as a lot of files chnaged in the source tree.
|
|
|
Re: Git reporting "Not a git repository" [message #573794 is a reply to message #463660] |
Mon, 03 August 2009 10:14  |
Eclipse User |
|
|
|
John wrote:
> Thanks, Matthias! The repository turned out to be unusable by Egit as
> well (see below)
....
> Exceeded maximum ref depth of 5 at HEAD. Circular reference?
>
> java.io.IOException: Exceeded maximum ref depth of 5 at HEAD. Circular
> reference?
> at org.spearce.jgit.lib.RefDatabase.readRefBasic(RefDatabase.ja va:332)
*sigh*
Apparently the HEAD reference was in a cycle, which is why C Git also
didn't want to touch this repository. Not sure how that happened on
clone within EGit, but it did, and its a bug in EGit's CloneOp.
Usually an easy way to fix this is:
echo 'ref: refs/heads/master' >.git/HEAD
though you shouldn't ever have to do that.
|
|
|
Re: Git reporting "Not a git repository" [message #573807 is a reply to message #467988] |
Mon, 03 August 2009 11:40  |
Eclipse User |
|
|
|
Sorry that I can't reconstruct steps that produce this situation. As
Shawn suspects, the HEAD is incorrect (and contains HEAD). I'm fairly
certain this was caused by my attempt to use the "Fetch From" command.
Perhaps it's worth noting that when I clone (and fetch), I'm specifying
a branch other than 'master'. I've noticed that my local repo sometimes
loses the tracking branch for master, so it's likely that it was in
that state at the time that I tried to fetch. To be clear, I've not
experienced any problem immediately after a straight clone.
Please let me know if you'd like to have a defect recorded given that I
don't have any more information than what I've stated above.
Thanks!
John
Shawn Pearce wrote:
> John wrote:
>> Thanks, Matthias! The repository turned out to be unusable by Egit as
>> well (see below)
> ...
>> Exceeded maximum ref depth of 5 at HEAD. Circular reference?
>>
>> java.io.IOException: Exceeded maximum ref depth of 5 at HEAD.
>> Circular reference?
>> at org.spearce.jgit.lib.RefDatabase.readRefBasic(RefDatabase.ja va:332)
>
> *sigh*
>
> Apparently the HEAD reference was in a cycle, which is why C Git also
> didn't want to touch this repository. Not sure how that happened on
> clone within EGit, but it did, and its a bug in EGit's CloneOp.
>
> Usually an easy way to fix this is:
>
> echo 'ref: refs/heads/master' >.git/HEAD
>
> though you shouldn't ever have to do that.
|
|
|
Powered by
FUDForum. Page generated in 0.06859 seconds