I just started (barely) to somewhat understand and use git. I'm using github and cloud9 IDE.
I figured out how to save (commit and then push ?) files to the github repository...
question:
Is there a command that will upload (and overwrite) files from my git to my ftp server where my website is hosted?
I've checked this question, but I'm not sure I want a .git on my server (unless I can still run my site off it).
I've also checked this question, but I'm not sure I can install anything on my server.
Is this not as simple as I thought it would be?
Any help is much appreciated.
Git is not an FTP client. But you could create a post-commit hook to do this. A git hook is a shell script which is executed with certain actions. You could use this to upload all of your source files to your FTP server when you do a commit. For more information about hooks, see:
http://www.kernel.org/pub/software/scm/git/docs/githooks.html
If you are working on the commandline - use lftp to ftp your files to your host. lftp is highly scriptable and will allow you to add it to a post-commit hook if you so desire.
If you are using a gui - you can try filezilla or any number of other ftp clients to move your files to your server.
If this is a project that you want other to work on in the future, you can consider learning capistrano for automatic deployments and ease of releases.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With