上下文
我使用git-ftp将我的git文件上传到ftp服务器。在git中,我有两个分支:development和production。当我想上传development分支时,我使用以下命令提交、推送并上传:
git ftp push --user <user> --passwd <passwd> <ftp-server>/development问题
假设我想把我的production分支推到我的服务器的production文件夹中,我怎么能告诉git-ftp我想要推动的是这个分支,而不是我的开发分支呢?我在男人中找不到这样的选择。例子:
git ftp push --user <user> --passwd <passwd> <ftp-server>/production --branch production发布于 2018-07-30 04:05:32
请参阅git-ftp范围。
https://github.com/git-ftp/git-ftp/blob/master/man/git-ftp.1.md
有一个如何配置生产/测试环境的示例。
$ git config git-ftp.testing.url ftp.testing.com:8080/foobar-path
$ git config git-ftp.testing.password simp3l
$ git config git-ftp.production.user manager
$ git config git-ftp.production.url live.example.com你应该使用
git ftp push -s production --branch production发布于 2016-07-10 13:39:12
据我所知,git-ftp只适用于文件状态(文件本身),而不是git分支,因此您的网络切换/签出将需要的数据推送到与git-ftp范围相关的数据中。
https://stackoverflow.com/questions/31424877
复制相似问题