How do I clone my git repo to a remote machine?
1 answer
1) Initialize the bare
git repository on the remote machine.
ssh remote_machine
mkdir my_project
cd my_project
git init --bare
git update-server-info # If planning to serve via HTTP
2) Set up your local repo to be able to pull / push from a remote device.
git remote add origin git@remote_machine:my_project.git
git push -u origin master
Both computers are now in sync.
+3
source to share