From 42b347f6d5ca764d1f24df944523cf813ece36f3 Mon Sep 17 00:00:00 2001 From: christolis Date: Sat, 2 Mar 2024 12:23:15 +0200 Subject: [PATCH] build(hooks): ignore untracked files --- scripts/pre-commit | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/pre-commit b/scripts/pre-commit index 9846ade420..87a8fdc42c 100644 --- a/scripts/pre-commit +++ b/scripts/pre-commit @@ -44,8 +44,8 @@ if [ "$spotlessExitCode" -ne 0 ]; then exit "$spotlessExitCode" fi -# Spotless possibly found changes, apply them -git add -A +# Spotless possibly found changes, apply them, excluding untracked files +git add -u # Restore back the unstaged changes pop_stash