Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 need to move Git to a new location and was wondering if there's a way to just rsync my git repository to a new location?

share|improve this question

rsync, or just clone, as git clones are complete copies of (the reachable parts of) the source repository.

share|improve this answer
git-clone would be safer. To use rsync you would need to stop all other access to the repository first to ensure rsync can produce a consistent copy at the other end. – David Spillett Apr 25 '10 at 11:44

You can use

git remote add servername master
git push servername master

Replace servername by you new git repository

share|improve this answer

I am no git expert, but where do you see the problem in doing exactly that? Of course, you will need to inform the users about this change and if it's not your machine, talk to the admin to set up the server part, but other than that, git repos are just directories with some (or a lot) files.

share|improve this answer

A simple scp -r will do the trick just fine.

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.