Skip to content

Instantly share code, notes, and snippets.

@MisterBianco
Created March 25, 2020 17:30
Show Gist options
  • Save MisterBianco/f69c12e741f806e045e063cf95839a6a to your computer and use it in GitHub Desktop.
Save MisterBianco/f69c12e741f806e045e063cf95839a6a to your computer and use it in GitHub Desktop.
A simple command to check if any file with some filetypes were changed in the most recent commit in a specific directory.
git diff --name-only HEAD HEAD~1 | grep "^src/" | grep -E ".java$|.kt$|.go$|.py$|.yml$|.json$|Dockerfile$|.nim$"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment