How to set up a repository using git-ftp?

后端 未结 4 1219
走了就别回头了
走了就别回头了 2021-02-15 03:55

I\'m a newbie so please explain how to set up a repository?
I installed git-ftp.
I tried : git ftp init -u my_User-p my_Pass - ftp://host.example.com/public_html

相关标签:
4条回答
  • 2021-02-15 04:37

    I think you have not init a local git repository, into which this remote is supposed to be added?

    Does your local directory have a .git folder?

    Try git init

    0 讨论(0)
  • 2021-02-15 04:40

    I found a ftp git tool which is much easier to use: Ftp-Git. It's a GUI ftp deployment tool which can push changed files in git repository to your ftp server. (All in a GUI way)

    0 讨论(0)
  • 2021-02-15 04:48

    You have to setup a git repositor first:

    Enter your Project directory:

    cd my/Project/
    

    Init a git repository on it:

    git init
    git add .
    git commit -m "Initial commit"
    

    Configure you FTP:

    git config git-ftp.user demouser
    git config git-ftp.url ftp.example.com/demofolder
    git config git-ftp.password demopassword
    

    Init the git-ftp client:

    git ftp init
    

    Push your changes to FTP:

    git ftp push
    

    Make your changes and commit:

    git add someFile.html
    git commit -m "Added someFile.html"
    

    Push your changes again and only what have changed is pushed:

    git ftp push
    

    That's it.

    0 讨论(0)
  • 2021-02-15 04:51

    If you are on macOS, take a look a GitFTP-Deploy.

    (Disclaimer: I am the creator of this app. Developed it for satisfying my own itch)

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