Trying to clone a repository in git, getting a error

I have two boxes, one is my local machine and the other is my dev server. Right now I’m testing this method of deploying apps using Git

I setup my local repository, added the files then committed. I am on Windows 7 & my server is Windows Server 2008.

  • Does using msysgit lead to repository corruption?
  • git “error: corrupt loose object” after moving a directory
  • Go back in history to an undamaged version?
  • How to recover Git objects damaged by hard disk failure?
  • Jar file gets corrupted after pushing to github
  • Should I worry about `git fsck` warning: “contains zero-padded file modes”
  • The server is mapped as the W:\ Drive with my ‘bare’ repository and my target ‘mock’ production folder as child folders.
    — I can get to each just fine, no connection problems.

    Here’s what I did to setup everything:

    1. Local dir git remote add origin w:\gitCentral

    2. Local dir git push origin master

    3. Type C:, then type CD testDeployment

    4. Now I’m in my test folder.

      A. I do git clone w:/gitCentral

    Cloning into gitCentral... done.
    error: refs/remotes/origin/master does
    not point to a valid object! error:
    Trying to write ref refs/heads/master
    with nonexistant object 559e2165845
    06e14ebef1121059e9461a86dd4f8 fatal:
    Cannot update the ref 'HEAD'.

  • How does Git(Hub) handle possible collisions from short SHAs?
  • How to get Git to convert CRLF files to LF, on Linux?
  • How do I interactively unstage a particular hunk in git?
  • Git add a message when pushing for who will pull
  • jenkins Nexus Artifact Uploader 400
  • Correct process to merge fork changes into GitHub
  • 2 Solutions collect form web for “Trying to clone a repository in git, getting a error”

    try to do the following (starting from your local folder, considering it is a git repo and has commits in current HEAD):

    git remote add origin w:/gitCentral
    git fetch origin
    git push origin master
    cd C:/testDeployment
    git clone w:/gitCentral
    

    This is happening, I think, for one of two reasons:

    Git wants forward slashes, not backward.
    Git doesn’t like spaces – use quotes.

    So, if your remote is “w:\Repositories\My App” Git would like to see that as “‘w:/Repositories/My App'”.

    That’s my hunch.

    Git Baby is a git and github fan, let's start git clone.