How to git push using ftp?

前端 未结 3 641
轮回少年
轮回少年 2020-12-29 09:54

I want to upload (using only ftp) to my server only changes. I have a working git repository in my local. But I cant figure out any way to push using ftp.

I can use

相关标签:
3条回答
  • 2020-12-29 10:33

    You should be able to push to a FTP repository using

    git push ftp://host.net/path/to/repo.git/
    
    0 讨论(0)
  • 2020-12-29 10:33

    I’ve written a little PHP script that heps with that. It si called PHPloy and is tightly-coupled with Git to determine what which files where edited/added/deleted and uploads them accordingly. You put your FTP details in a deploy.ini file and run just a command to deploy:

    phploy
    

    You can also deploy to multiple servers at once. And if you have multiple servers configured, you can select to deploy to one of them like this:

    phploy --server staging
    

    There is more that can be done – check it out on Github: https://github.com/banago/PHPloy

    0 讨论(0)
  • 2020-12-29 10:55

    The git-ftp script does exactly this:

    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.

    0 讨论(0)
提交回复
热议问题