求双线部署方案.... github + coding

2017-01-26 18:28:57 +08:00
 xx0219

.... github 实在太慢了... 特别是我拿博客当手册使用的.速度自然越快越好...

据说 coding 不错....

但是有没有办法 能同时部署本地的某个文件夹 到 github 和 coding 的 ?????

不想 github 这边发布一次, 再去 coding 发布一次.. 太 low 了.....

3037 次点击
所在节点    问与答
6 条回复
MajestySolor
2017-01-26 18:44:18 +08:00
git/config 里这样写

[remote "github"]
url = git@github.com:aaa/bbb.git
fetch = +refs/heads/*:refs/remotes/github/*
[remote "coding"]
url = git@git.coding.net:aaa/bbb.git
fetch = +refs/heads/*:refs/remotes/coding/*
[remote "all"]
url = git@github.com:aaa/bbb.git
url = git@git.coding.net:aaa/bbb.git

然后 push all 就是直接推送到 github 和 coding
不清楚这样是不是规范,我一直这样用好久了
hwk603
2017-01-26 19:04:26 +08:00
添加同名多个远程仓库就好了:

```
git remote add all https://github.com/yours/a.git
git remote set-url --add all https://git.coding.net/yours/a.git
git push all --all
```
hanzichi
2017-01-26 21:47:07 +08:00
当手册用直接部署在本地得了
lslqtz
2017-01-26 23:41:43 +08:00
coding 用 github 自动部署更新
phrack
2017-01-27 11:34:12 +08:00
bash 脚本应该就可以啊,两个 git push 不就完事了?
taoyu1994x
2017-01-27 12:48:44 +08:00
楼主是觉得两个 git push 太 low ?

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/337050

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX