Files
dotfiles/private_dot_local/bin/executable_project_git_fetch
2026-01-22 08:11:17 +01:00

9 lines
293 B
Bash

#!/usr/bin/env zsh
# Is this directory inside a git repo?
if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
# Are we at the repo root? (prefix empty = root)
if [ -z "$(git rev-parse --show-prefix)" ]; then
echo "Fetching latest changes from remote..."
git fetch
fi
fi