How can I check in a Bash script if my local Git repository has changes? October 5, 2022 by Tarik Using git status: cd /git/directory if [[ `git status --porcelain` ]]; then # Changes else # No changes fi