Git / ftp workflow logic

Let me preface this by saying that I'm extremely new to git, but have a basic understanding of Source controls.

Here is my situation. I am currently using a regular shared hosting account with a basic hosting provider similar to a hosger, and am using ftp / cpanel. I use ftp to upload / download files from the server.

I recently installed git on my Mac and Tower (Git Client for Mac) , and I plan to use github to host my repository.

Say theoretically, when I go to drag and drop files into my repo, I want to update the current files on my web server, as well as for compliance. What is the best way to do this?

Do I just need to FTP the entire repo on my host? I would suggest that this could have potential problems, such as changing file permissions or something else unexpected.

It seems to me that I missed something in this process. Is there a way to host my local repo copy on my web server? Do I need a hosting account that offers SSH or terminal access for this?

Should I create some kind of hook.

Any information would be appreciated.

+3
source share
2 answers

For easy download / sync git repo via ftp you can use git-ftp

It is pretty easy to use ... everything you do to download when you are configured :

git-ftp push

ssh rsync exclude.git.

[dev@dev_server website_repo]$ rsync -avz --exclude ".git" * dev@production_server:/var/www/mywebsite/.
+2

ssh ? , ssh. .

0

All Articles