You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#!/bin/bash
# Get the list of changed files
changed_files=$(git diff --cached --name-only)
# Check if specific files are changed
if echo "$changed_files" | grep -q "path/to/specific/file.txt"; then
# Run your desired command
echo "Specific file changed, running checks..."
# For example, run linters or tests
# ...
fi
Add conditional handling so e.g. logstash only restarts if its configuration files changed, etc.
See https://stackoverflow.com/questions/4877306/list-changed-files-in-git-post-merge-hook
The text was updated successfully, but these errors were encountered: