diff --git a/slurm_logs/.gitignore b/slurm_logs/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..5d59d6d0f3388a645844c8f5fc57bcd929a53798
--- /dev/null
+++ b/slurm_logs/.gitignore
@@ -0,0 +1,6 @@
+### This file is here to avoid a SLURM error when running a job because of the missing slurm_logs directory
+
+# Ignore everything in this directory
+*
+# Except this file
+!.gitignore
\ No newline at end of file