Can you download GitBook Files and Directories?

Jacob picture Jacob · Jan 20, 2016 · Viewed 15.5k times · Source

GitBook allow content transfers into different formats but is there an option to download files & directories as they are edited (as text)?

By example, GitHub code is stored on servers and locally on contributor's PCs too.

Answer

Left SE On 10_6_19 picture Left SE On 10_6_19 · Jan 24, 2016

Yes. You can clone the git repository where the GitBook resides on.

To clone the repository onto a local PC, type:

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.

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.


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.

enter image description here