Pulling Git from server

I’ve managed to commit my changes locally to Github. Now I want to update it on my server. How do I connect to my server to pull the files from Github?

  • List all the files that ever existed in a Git repository
  • Remote branch with multiple local tracking branches
  • git equivalent of 'hg share'?
  • Not working: GitBlit groovy hook which push changed to other Gitblit server repo
  • Is “refs/heads/master” same as “refs/remotes/origin/master” in Git?
  • Installing Git-TFS without Git itself
  • Same Django project different GIT repositories
  • Configuring egit with BitBucket
  • Why not check in AssemblyInfo.cs
  • How to use Jenkins pre-build branch merging only for branches I want to merge?
  • How do I merge locally a master and a fork in git?
  • Permissions with Git Post-Receive
  • 3 Solutions collect form web for “Pulling Git from server”

    If the repository doesn’t exist yet:

    git clone git@github.com:sam_mitchell/my-project.git
    

    If the repository exists, but you don’t have a remote set up:

    git remote add origin git@github.com:sam_mitchell/my-project.git
    git pull origin master
    

    If you already have your remotes set up, then:

    git pull origin master
    

    Generate a new ssh-key on the server. Do not share keys across machines!

    Add the public key to github.

    Clone.

    If it’s your server; have you tried sshing into it, making sure that Git is installed and then cloning it as normal.

    You’ll need to set up the ssh keys on the server and add them to your GitHub account if you want to be able to have read+write access to your repositories.

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