I notice i can have multiple remote repos. This is great. I'd like to have one on the local network. The network and that server is usually good but sometimes it goes down we'll have a backup server to use. Anyways

I did git init on a local folder and clone a github project of mine. I added the local folder as a remote repo and pushed. I got many errors unlike when i first pushed to github.

How do i create a repo to be pushed too?

link|improve this question

55% accept rate
feedback

1 Answer

up vote 3 down vote accepted

If you want to push locally, you need to create your local repo as a bare one:

git init --bare .

See Git push only for bare repositories?:

You shouldn't push to a non-bare repository because pushing will only update the internal state of the repo, and won't affect the checked-out, on-disk copies of the files.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.