Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a web hosting service, I want to store my code on it.
I was thinking perhaps opening a Git repo for the entire dev/ directory
and somehow in the Git hooks make it upload only the files that have been
changed to the server (I can't install git on the web hosting site).
Is there something similar? like an already git-hook for that?
Perhaps a smarter solution...

share|improve this question

2 Answers 2

up vote 1 down vote accepted

One of our friends at Stack Overflow wanted a tool to upload their git-hosted web application to their production server via FTP, and it turns out two of the tools one user recommended support incremental backup:

git-ftp by René Moser is a simple shell script for doing FTP the Git way. Use git-ftp.sh to upload only the Git tracked files to a FTP server, which have changed since the last upload. This saves time and bandwith. Even if you play with different branches, git-ftp.sh knows which files are different. No ordinary FTP client can do that.

git-ftp by Edward Z. Yang is a simple script written in python for uploading files in a Git repository via FTP, only transferring new files and removing old files.

share|improve this answer

There is a possibility that git is already installed. If you have interactive SSH access, be sure to check for it – this would work much faster than a 'dumb' FTP transport.

But if only FTP is available:

git remote add webhost ftps://asaf@webhost.tld/code.git
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.