.gitignore for Clojure

14 ignore rules for Clojure, ready to copy into your repository.

Modern Lisp for the JVM

The complete .gitignore for Clojure

# Generated by LFGitignore - https://lfgitignore.com
# Created: 2026-09-17 17:00:39 UTC
# Technologies: Clojure

### Clojure ###
# Java compiled class file
*.class
pom.xml
pom.xml.asc
# Java archive
*.jar
/lib/
/classes/
/target/
/checkouts/
.lein-deps-sum
.lein-repl-history
.lein-plugins/
.lein-failures
.nrepl-port
.cpcache/

What these Clojure rules actually ignore

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

General

Pattern What it ignores
*.class Java compiled class file
pom.xml General
pom.xml.asc General
*.jar Java archive
/lib/ General
/classes/ General
/target/ General
/checkouts/ General
.lein-deps-sum General
.lein-repl-history General
.lein-plugins/ General
.lein-failures General
.nrepl-port General
.cpcache/ General

How to use this .gitignore for Clojure

  1. Copy the Clojure 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 Language .gitignore templates

See every Language template