作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用 git-ftp将我的 git 文件上传到我的 ftp 服务器。在 git 中,我有 2 个分支:development
和 production
。当我想上传 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/
我是一名优秀的程序员,十分优秀!