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

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -