.gitignore for Bazel
4 ignore rules for Bazel, ready to copy into your repository.
Fast, scalable build system
The complete .gitignore for Bazel
# Generated by LFGitignore - https://lfgitignore.com
# Created: 2026-08-05 02:27:10 UTC
# Technologies: Bazel
### Bazel ###
/bazel-*
/.ijwb/
/.aswb/
/.clwb/
What these Bazel rules actually ignore
Every pattern below, and why it belongs in your .gitignore.
General
| Pattern | What it ignores |
|---|---|
/bazel-* |
Ignore all bazel-* symlinks. There is no full list since this can change based on the name of the directory bazel is cloned into. |
/.ijwb/ |
Directories for the Bazel IntelliJ plugin containing the generated IntelliJ project files and plugin configuration. Separate directories are for the IntelliJ, Android Studio and CLion versions of the plugin. |
/.aswb/ |
General |
/.clwb/ |
General |
How to use this .gitignore for Bazel
- Copy the Bazel 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.