If you started writing your book on GitBook and you now want to host its source on GitHub, don't worry, it's easy. To do so, you can either use the GitHub import tool, or operate from the command line.
https://git.gitbook.com/MyName/MyBook.git(this url can be found in your book settings).
This operation will overwrite the content of the GitHub repository.
After creating a repository on GitHub:
# Clone your GitBook repository (you'll need to enter your username and password) $ git clone https://git.gitbook.com/MyName/MyBook.git ./mybook # Enter the cloned book cd ./mybook # Push it to Github $ git push https://github.com/username/repo.git master --force