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?
Asked
Active
Viewed 7,850 times
4 Answers
11
rsync, or just clone, as git clones are complete copies of (the reachable parts of) the source repository.
ptman
- 29,022
4
You can use
git remote add servername master
git push servername master
Replace servername by you new git repository
Bruno Adelé
- 199
0
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.
Sven
- 99,533
- 15
- 182
- 228
git-clonewould be safer. To usersyncyou would need to stop all other access to the repository first to ensurersynccan produce a consistent copy at the other end. – David Spillett Apr 25 '10 at 11:44