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?
3 Solutions collect form web for “Pulling Git from server”
If the repository doesn’t exist yet:
git clone email@example.com:sam_mitchell/my-project.git
If the repository exists, but you don’t have a remote set up:
git remote add origin firstname.lastname@example.org: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.
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.