You are here: Home » narzędzia IT » git push into ftp

git push into ftp

Featured Image

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!

  1. Install git-ftp as described on its page.
  2. If you have something on FTP like wordpress download it into your computer.
  3. git init your local repo in downloaded directory and commit first commit.
  4. 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.
  5. 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.
  6. After this simply:git ftp pushYou will get:No changed files for myftpserver.com/wordpress/. Everything up-to-date.
  7. 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’.

Uploading …

Last deployment changed to b6ff4d52d9567337fdsfg73800b45a3c2699aa.

Dodaj komentarz

Twój adres email nie zostanie opublikowany. Pola, których wypełnienie jest wymagane, są oznaczone symbolem *