The frustration when you need to work on a project, which is hosted on the server, where there is no shell and you can’t pull from git repo?
So you are tracking your changes locally using git. And what next? FTP whole directory to push into production? NO!
There is cool git-ftp script!
- Install git-ftp as described on its page.
- If you have something on FTP like wordpress download it into your computer.
- git init your local repo in downloaded directory and commit first commit.
- Now use :git ftp catchup -A –user dummyuser –passwd yoursuperstronpassword ftp://myftpserver.com/wordpressThis will tell git ftp that it should not download or upload any files. Just to upload log file into ftp. -A option is for ftp active mode which is usually needed.
- Next thing is to put all configuration into git config like:git config git-ftp.user johnSee manual page for all options like passwords, url etc.
- After this simply:git ftp pushYou will get:No changed files for myftpserver.com/wordpress/. Everything up-to-date.
- If you change something and create commit:git commit -a -m „minor change”[master b6ff4d5] minor change1 file changed, 1 insertion(+), 1 deletion(-)
git ftp push
There are 1 files to sync:
[1 of 1] Buffered for upload ‚wp-content/plugins/xyz/file.php’.
Last deployment changed to b6ff4d52d9567337fdsfg73800b45a3c2699aa.