2

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?

1 Answer 1

2

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.

You must log in to answer this question.