0

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
4
  • Please explain what you did to clone your primary repo. And maybe don't call it master repo because that is often associated with the master branch in any repo. Commented May 26, 2016 at 11:18
  • i think this link will be helpfull Link Commented May 26, 2016 at 11:19
  • Add your git config file Commented May 26, 2016 at 11:21
  • * Added config and git commands to question. Commented May 26, 2016 at 13:55

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.