dotfiles/scripts/git-check-remote
2023-05-10 12:40:42 -06:00

9 lines
214 B
Bash
Executable file

#!/bin/sh
# Check for new commits in remote
git -C "$1" remote update > /dev/null 2>&1
commits=$(git -C "$1" status | grep -o "[0-9*]\scommit" | cut -d " " -f 1)
[ -z "$commits" ] && exit
printf "󰊢 $commits"