In this short article, we would like to show how to check if a project directory that uses Git contains some local changes.
#!/bin/bash if [ -n "$(git status --porcelain)" ]; then echo "Some local changes detected !!!" else echo "There are no local changes." fi