Table of Contents generated with DocToc
设置登录密钥,避免重复登录
打开~/.netrc
文件,如果没有,新建一个,然后在里面添加内容如下:
machine git.gitbook.com
login USERNAME-or-EMAIL
password API-TOKEN-or-PASSWORD
推荐使用API TOKEN的方式,参见该链接
Create a new repository on the command line
git init
git add README.md SUMMARY.md
git commit -m "first commit"
git remote add gitbook https://git.gitbook.com/{{UserName}}/{{Book}}.git
git push -u -f gitbook master
Push an existing repository
git remote add gitbook https://git.gitbook.com/{{UserName}}/{{Book}}.git
git push -u -f gitbook master