.gitignore for GitBook
6 ignore rules for GitBook, ready to copy into your repository.
Documentation platform
The complete .gitignore for GitBook
# Generated by LFGitignore - https://lfgitignore.com
# Created: 2026-08-05 01:28:10 UTC
# Technologies: GitBook
### GitBook ###
# Grunt intermediate storage
.grunt
node_modules
_book
*.epub
*.mobi
*.pdf
What these GitBook rules actually ignore
Every pattern below, and why it belongs in your .gitignore.
Node rules:
| Pattern | What it ignores |
|---|---|
.grunt |
Grunt intermediate storage |
node_modules |
# Dependency directory # Commenting this out is preferred by some people, see # https://docs.npmjs.com/misc/faq#should-i-check-my-node_modules-folder-into-git |
Book build output
| Pattern | What it ignores |
|---|---|
_book |
Book build output |
*.epub |
eBook build output |
*.mobi |
Book build output |
*.pdf |
Book build output |
How to use this .gitignore for GitBook
- Copy the GitBook rules above, or download the file directly.
- Create a file named .gitignore at the root of your Git repository and paste the rules into it.
- If some of those files are already tracked, run git rm -r --cached . then commit again — Git only applies ignore rules to untracked files.
- Commit the .gitignore so everyone on the team shares the same rules.