Skip to content

Instantly share code, notes, and snippets.

View mbloms's full-sized avatar

Mikael Blomstrand mbloms

View GitHub Profile
@mbloms
mbloms / filter-branch-spotless.sh
Created December 15, 2025 13:51
Spotless Apply using git filter-branch
git filter-branch -f --prune-empty --tree-filter '
if [ -x ./gradlew ]; then
./gradlew -q spotlessApply
fi
' --index-filter 'git rm -r --cached --ignore-unmatch .gradle build' -- integration..mikael-dev

Global Agents Instructions

Terminal commands

Shell compatibility

Be aware that the shell could be fish, not bash or zsh. Use fish-compatible syntax when running terminal commands, or run them in bash explicitly by wrapping them in bash -c '...'.

Pager

When running git commands, add the --no-pager flag to make sure the entire output is printed.