gpt4 book ai didi

git - 如何使用 git-ftp 将特定分支推送到 ftp 服务器

转载 作者:行者123 更新时间:2023-12-05 02:21:57 27 4
gpt4 key购买 nike

上下文

我正在使用 git-ftp将我的 git 文件上传到我的 ftp 服务器。在 git 中,我有 2 个分支:developmentproduction。当我想上传 development 分支时,我提交、推送然后使用命令上传:

git ftp push --user <user> --passwd <passwd> <ftp-server>/development

问题

假设我想将我的 production 分支推送到服务器的 production 文件夹中,我如何告诉 git-ftp 我要推送的是这个分支,而不是我的开发?我在 man 中找不到相应的选项.示例:

git ftp push --user <user> --passwd <passwd> <ftp-server>/production --branch production

最佳答案

引用 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

关于git - 如何使用 git-ftp 将特定分支推送到 ftp 服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31424877/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com