Dandy
Dandy

Reputation: 861

Git repo clone not working

When executing the "git status" command on my clone repo I get the following error:

"error: object directory /[Path]/.git/objects does not exist; check .git/objects/info/alternates.

error: refs/heads/master does not point to a valid object!

error: refs/remotes/origin/HEAD does not point to a valid object!

error: refs/remotes/origin/master does not point to a valid object! No revs to be shown."

This doesn't happen on my master repo.

Is there a specific way to clone a master repo so that the clone has version control as well?

Here is the config:

[core]
    repositoryformatversion = 0
    filemode = false
    bare = false
    logallrefupdates = true
    ignorecase = true
    precomposeunicode = true
    hideDotFiles = dotGitOnly
[remote "origin"]
    url = /CloneDirectory/.
    fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
    remote = origin
    merge = refs/heads/master

Here is the command I executed to clone:

git clone -l -s -n . ../CloneDirectory 

cd ../CloneDirectory 

git show-branch 

git checkout

Upvotes: 0

Views: 1782

Answers (1)

Dandy
Dandy

Reputation: 861

I figured out the issue.

I have an unconventional setup where I have my project hosted on dropbox and I use Git to version the project. At home I work on the project on a mac, at work I'm on windows. The problem was that I cloned my main repo on my mac to a different directory on dropbox, then when I tried to use Git on windows it cause a lot of errors. When I booted my project on my mac I was able to version fine and ran into no errors.

A rookie mistake, but I learned my lesson.

Upvotes: 1

Related Questions