#!/bin/sh . "$(dirname "$0")/_/husky.sh" STAGED_CS=`git diff --cached --name-only --diff-filter=ACMR --pickaxe-regex "*.cs" | tr '\n' ';'` dotnet husky run --group pre-commit --args $STAGED_CS # amend the commit with the staged files git add `git diff --cached --name-only --diff-filter=ACMR --pickaxe-regex "*.cs"`