git 你可以下载 GitBook 文件和目录吗?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/34908504/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Can you download GitBook Files and Directories?
提问by Jacob
GitBookallow content
transfers into different formats but is there an option to download files & directoriesas they are edited (as text)?
GitBook允许content
传输为不同的格式,但是否可以选择在编辑时下载文件和目录(作为文本)?
By example, GitHubcode
is stored on servers and locally on contributor's PCs too.
例如,GitHubcode
存储在服务器上,也存储在贡献者的 PC 本地。
回答by Left SE On 10_6_19
Yes. You can clonethe git repository where the GitBook resides on.
是的。您可以克隆GitBook 所在的 git 存储库。
To clone the repository onto a local PC, type:
要将存储库克隆到本地 PC,请键入:
git clone https://git.gitbook.com/YOUR-USER-NAME/YOUR-BOOK-NAME.git
You will be prompted for your username for gitbook, and your password or an access token (i.e, an API Key). If you do not have a password, you may look up your unique access token in Settings -> Applications/Tokens.
系统将提示您输入 gitbook 的用户名、密码或访问令牌(即 API 密钥)。如果您没有密码,您可以在设置 -> 应用程序/令牌中查找您的唯一访问令牌。
You may also clone your git repository onto GitHub, but when you do so, GitHub will also ask for GitBook's username and password/access token so that it can read from Gitbook's git repository and just copy everything over. So you still need to have your username and your password/access token handy.
您也可以将您的 git 存储库克隆到 GitHub 上,但是当您这样做时,GitHub 还会要求提供 GitBook 的用户名和密码/访问令牌,以便它可以从 Gitbook 的 git 存储库中读取并复制所有内容。因此,您仍然需要准备好您的用户名和密码/访问令牌。
EDIT: When this answer was first written in January 2016, there was no official link to the git
repository, making this an undocumented feature. Since then, the Gitbook team has exposed the URL to the git
repository via its UI, as can be seen in this picture.
编辑:当这个答案于 2016 年 1 月首次编写时,没有到git
存储库的官方链接,这使得它成为一个未记录的功能。从那时起,Gitbook 团队git
通过其 UI公开了存储库的 URL ,如下图所示。