How to set up a repository using git-ftp?

南楼画角 提交于 2019-12-04 04:25:53

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.

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)

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

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)

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!