我是新手,所以请解释一下如何设置存储库?
我安装了 git-ftp。
我试过了:git ftp init -u my_User-p my_Pass - ftp://host.example.com/public_html
但是我收到了这个错误信息:
fatal : Not a git repository (or any of the parent directories): .git
fatal : Not a Git project? Existing ....
最佳答案
您必须先设置一个 git 存储库:
输入您的项目目录:
cd my/Project/
在上面初始化一个 git 仓库:
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 客户端:
git ftp init
将您的更改推送到 FTP:
git ftp push
进行更改并提交:
git add someFile.html
git commit -m "Added someFile.html"
再次推送您的更改,并且只推送更改的内容:
git ftp push
就是这样。
关于git - 如何使用 git-ftp 设置存储库?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20398565/