git - 如何使用 git-ftp 设置存储库?

标签 git ftp git-ftp

我是新手,所以请解释一下如何设置存储库?
我安装了 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 ....

terminal screenshot

最佳答案

您必须先设置一个 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/

相关文章:

git - 使用 git-ftp 将子文件夹推送到 ftp

git 中央存储库和团队

git 忽略除某些子目录之外的所有内容

git - 更改 git 分支的来源

c - libcurl,处理分块数据

c# - ftp上传太大

git-ftp 配置设置,密码以 # 结尾

git - "git ftp init"没有发送所有文件

git - 由于 Git 是累积的,当 repo 变成 5GB 时如何长期处理?