fatal: packfile name 'server' does not end with '.pack'

I had a non-bare git repository. I wanted to create a bare repository in a server to which I have an SSH access and make it the origin of the older repository.

I first created a bare repository in a directory X in an NFS partition by git init --bare.
Then I signified in the original repository the origin as git remote add origin myusername@myserver:X. (In fact, I tried with the wrong user name and tried to push it for a couple of times; I deleted the wrong specification by git remote rm origin.)

  • Should I include .sass-cache with the repo when versioning a web project?
  • How can I find out which Git commits cause conflicts?
  • What does each of the stand for in context of git -p
  • Cannot git clone to VMWare shared folder
  • Is “git reset --hard” the same as “git reset --hard HEAD”?
  • how do I undo all changes in my local rep and make it clone of upstream in github
  • When I tried to push, I got an error:

     fatal: packfile name 'myserver' does not end with '.pack'
    

    Why am I failing in pushing? What is a possible workaround?

    Addendum: X is in full path.

  • How do you share your git repository with other developers?
  • Why is .gitignore not ignoring my files?
  • git status for cloned repository shows file deleted
  • Use git shortcuts with a new version, overriding old
  • Best way to fix a previous commit in GIT
  • Git and TFS integration for TFS Build
  • Git Baby is a git and github fan, let's start git clone.