如果你開始在 GitBook 上寫書了,但現(xiàn)在你想把它的源代碼托管到 GitHub 上,不用擔(dān)心,這很簡單:
當(dāng)你的內(nèi)容遷移到 GitHub 后,你可以建立集成來讓 GitBook 依然能從 GitHub 中構(gòu)建你的書本:集成 GitHub
在 GitHub 上創(chuàng)建完倉庫后。
注意:這個操作會覆蓋你的 git 歷史記錄。
# Clone你的GitBook倉庫(你需要輸入你的用戶名和密碼)
$ git clone https://git.gitbook.com/MyName/MyBook.git ./mybook
# 進(jìn)入Clone的書本
cd ./mybook
# Push它至GitHub
$ git push https://github.com/username/repo.git master --force
更多建議: