How do I clone my git reposity to a remote machine?

I have a git repo set up on my computer. I also have a remote machine that I can ssh into. I want to clone the repo to the remote machine (and then keep them in sync with push and pull). How do I do this? I’ve only ever cloned from GitHub.

  • Extract a particular version file from Git repository
  • Git “Live Server” Best Practices
  • Phonegap - automatically including correct cordova
  • Git smudge filter on Windows to create local configuration file
  • Gitlab backup without repository commits
  • In which programming languages are technologies like Git built and how can I learn them?
  • msysgit very slow in Windows 7
  • Why should I put files inside .idea folder under version control?
  • How to distribute files in a Python sdist that are not VCS tracked?
  • Can Git fetch from remote-tracking branches of a remote repository?
  • Single Git repo with directories in multiple locations
  • Installing Git on a Debian Lenny server
  • One Solution collect form web for “How do I clone my git reposity to a remote machine?”

    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 to serve via HTTP
    

    2) Configure local repo to be able to pull/push from remote one.

    git remote add origin git@remote_machine:my_project.git
    git push -u origin master
    

    Now both machine are in sync.

    Git Baby is a git and github fan, let's start git clone.