如何使用git-ftp建立存储库?
问题描述:
我是新手,所以请解释如何设置存储库?
我安装了git-ftp.
我试过了git ftp init -u my_User-p my_Pass - ftp://host.example.com/public_html
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
但我收到此错误消息:
fatal:不是git存储库(或任何父目录):.git
致命的:不是Git项目?现有....
fatal : Not a git repository (or any of the parent directories): .git
fatal : Not a Git project? Existing ....
答
您必须首先设置git存储库:
You have to setup a git repositor first:
输入您的项目目录:
cd my/Project/
在其上初始化一个git存储库:
Init a git repository on it:
git init
git add .
git commit -m "Initial commit"
配置FTP:
git config git-ftp.user demouser
git config git-ftp.url ftp.example.com/demofolder
git config git-ftp.password demopassword
启动git-ftp客户端:
Init the git-ftp client:
git ftp init
将更改推送到FTP:
git ftp push
进行更改并提交:
git add someFile.html
git commit -m "Added someFile.html"
再次推送您的更改,然后仅推送更改的内容:
Push your changes again and only what have changed is pushed:
git ftp push
就是这样.