"Synchronizing" files between local and remote server using Git
Posted
by
ConcreteVitamin
on Server Fault
See other posts from Server Fault
or by ConcreteVitamin
Published on 2011-10-04T04:16:27Z
Indexed on
2012/12/01
17:06 UTC
Read the original article
Hit count: 175
My intended goal:
I maintain some files in my local computer, and I also share them with others by putting them on my website. In the past I did this by manually uploading all the files using FTP, every time I did some modifications etc. Now, I am wondering if I can use Git to help me achieve this (by "pushing" the local files to my website server). My server is hosted by Dreamhost.
First Attempt:
First, I try this tutorial. I first push my local files to my Github repo, and ssh into my Dreamhost server to clone --bare from the Github repo. But I find that git does not transfer my files. So I ignore the tutorial.
Second Attempt:
I ssh into my Dreamhost server to clone directly from Github. My files are all transfered to the server. Then, on my local computer, I git remote add dreamhost ssh://[email protected]/~/my-project
. Then I add some files, and commit, and git push dreamhost master
. And a bunch of errors appears:
http://geotakucovi.com/gitError.jpg
As a newbie Git user, I must have missed something. Please help!
© Server Fault or respective owner