How do I clone my git reposity to a remote machine? -
i have git repo set on computer. have remote machine can ssh into. want clone repo remote machine (and keep them in sync push , pull). how do this? i've ever cloned github.
1) initialize bare
git repository on remote machine.
ssh remote_machine mkdir my_project cd my_project git init --bare git update-server-info # if planning serve via http
2) configure local repo able pull/push remote one.
git remote add origin git@remote_machine:my_project.git git push -u origin master
now both machine in sync.
Comments
Post a Comment