.gitignore for SBT

10 ignore rules for SBT, ready to copy into your repository.

Build tool for Scala and Java

The complete .gitignore for SBT

# Generated by LFGitignore - https://lfgitignore.com
# Created: 2026-08-05 01:31:23 UTC
# Technologies: SBT

### SBT ###
dist/*
# Maven build directory
target/
lib_managed/
src_managed/
project/boot/
project/plugins/project/
.history
# Cache directory
.cache
.lib/
.bsp/

What these SBT rules actually ignore

Every pattern below, and why it belongs in your .gitignore.

General

Pattern What it ignores
dist/* General
target/ Maven build directory
lib_managed/ General
src_managed/ General
project/boot/ General
project/plugins/project/ General
.history General
.cache Cache directory
.lib/ General
.bsp/ General

How to use this .gitignore for SBT

  1. Copy the SBT rules above, or download the file directly.
  2. Create a file named .gitignore at the root of your Git repository and paste the rules into it.
  3. If some of those files are already tracked, run git rm -r --cached . then commit again — Git only applies ignore rules to untracked files.
  4. Commit the .gitignore so everyone on the team shares the same rules.

Other Build Tool .gitignore templates

See every Build Tool template