this will work on linux where notify-send is installed
((
branch_name=dev
if ! git rev-parse --verify dev 2> /dev/null; then
branch_name=master
fi
fetch_output="$(git fetch origin "$branch_name" 2> /dev/null)"
if [[ -n "$fetch_output" ]]; then
notify-send \
--urgency=CRITICAL 'git merge info' "You may need to merge with the upstream for repo: '$(pwd)'"
fi
) &> /dev/null & ) &> /dev/null
the default integration branch is "dev", if "dev" doesnt exist we fallback to master. It will send a notification to the desktop if there are new commits that haven't been fetched before.