Open ZoomQuiet opened 8 years ago
~ 是什么以及为什么
~ 本质上由于 gitbook NoZuoNoDie 的行径,导致以往的自然流程失效:
NoZuoNoDie
已知:
目标:
所以:
github
gitbook
https://www.gitbook.com/book/[帐号]/[图书名]/details
https://git.gitbook.com/[帐号]/[图书名].git
技巧:
url = https://用户名:口令@git.gitbook.com/帐号/[图书名].git
/path/2/[图书名]
/path/2/[图书名]/.git/config
[remote "origin"] url = git@github.com:OpenMindClub/[图书名].git fetch = +refs/heads/*:refs/remotes/origin/*
[remote "book"] url = https://git.gitbook.com/[帐号]/[图书名].git fetch = +refs/heads/*:refs/remotes/origin/* [remote "hub"] url = git@github.com:OpenMindClub/[图书名].git fetch = +refs/heads/*:refs/remotes/origin/* [remote "origin"] url = git@github.com:OpenMindClub/[图书名].git fetch = +refs/heads/*:refs/remotes/origin/*
$ git remote -v book https://git.gitbook.com/[帐号]/[图书名].git (push) book https://git.gitbook.com/[帐号]/[图书名].git (fetch) hub git@github.com:OpenMindClub/[图书名].git (push) hub git@github.com:OpenMindClub/[图书名].git (fetch) origin git@github.com:OpenMindClub/[图书名].git (push)
[remote "book"] url = https://[用户名]:[口令]@git.gitbook.com/[帐号]/[图书名].git fetch = +refs/heads/*:refs/remotes/origin/*
注意:
口令中不能包含 @
那么,俺就可以用两次 git 操作,完成两个仓库的内容发送了:
$ git pu hub Counting objects: 18, done. Delta compression using up to 8 threads. Compressing objects: 100% (15/15), done. Writing objects: 100% (16/16), 3.29 KiB | 0 bytes/s, done. Total 16 (delta 3), reused 0 (delta 0) To git@github.com:OpenMindClub/[图书名].git 8c3c8b6..f27428a master -> master $ git pu book Counting objects: 20, done. Delta compression using up to 8 threads. Compressing objects: 100% (15/15), done. Writing objects: 100% (16/16), 3.29 KiB | 0 bytes/s, done. Total 16 (delta 3), reused 0 (delta 0) To https://[用户名]:[口令]@git.gitbook.com/[帐号]/[图书名].git 8c3c8b6..f27428a master -> master
经过文档研究,发现,其实, git 可以任性的识别仓库配置中,多个 uri 的,那么增强配置为
... [remote "origin"] url = https://[用户名]:[口令]@git.gitbook.com/[帐号]/[图书名].git url = git@github.com:OpenMindClub/[图书名].git fetch = +refs/heads/*:refs/remotes/origin/*
再进行默认推送, 就发现,自动完成了两个仓库的分别 push:
$ git pu Counting objects: 8, done. Delta compression using up to 8 threads. Compressing objects: 100% (4/4), done. Writing objects: 100% (4/4), 2.00 KiB | 0 bytes/s, done. Total 4 (delta 2), reused 0 (delta 0) To https://[用户名]:[口令]@git.gitbook.com/[帐号]/[图书名].git f27428a..0d06615 master -> master Counting objects: 7, done. Delta compression using up to 8 threads. Compressing objects: 100% (4/4), done. Writing objects: 100% (4/4), 2.00 KiB | 0 bytes/s, done. Total 4 (delta 2), reused 0 (delta 0) To git@github.com:OpenMindClub/[图书名].git f27428a..0d06615 master -> master
综上可得:
pull-request
-f
gitbook 双推技巧页面404 无法打开。 我对gitbook github双推的理解:在电脑本地对文章进行编辑后,通过双推直接推送到gitbook页面与github上。 自己对双推设置还没折腾好,尝试利用同期学院提供的优秀代码 将clone到本地的个人repo(与gitbook关联的)中README文件修改,执行脚本后,gitbook github均无变化( ⊙ o ⊙ ) 明天排查原因并反馈到Issue上
~ 是什么以及为什么
现象
解决
~ 本质上由于 gitbook
NoZuoNoDie
的行径,导致以往的自然流程失效:宏观上
已知:
目标:
所以:
技术上
github
gitbook
https://www.gitbook.com/book/[帐号]/[图书名]/details
https://git.gitbook.com/[帐号]/[图书名].git
技巧:
url = https://用户名:口令@git.gitbook.com/帐号/[图书名].git
操作上
/path/2/[图书名]
/path/2/[图书名]/.git/config
有以下配置声明注意:
隐藏约定 ~口令中不能包含 @
,否则,你懂的...手工双推
那么,俺就可以用两次 git 操作,完成两个仓库的内容发送了:
自动双推
经过文档研究,发现,其实, git 可以任性的识别仓库配置中,多个 uri 的,那么增强配置为
再进行默认推送, 就发现,自动完成了两个仓库的分别 push:
( ̄▽ ̄)
综上可得:
pull-request
pull-request
的礼节,不是那么简单的-f
都是一种野蛮行为,必须遭到所有人的 BS !