Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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