Files
SuperSunday/sync2.sh
karim hassan e3620c7f42 Day:1
2025-08-18 19:30:47 +00:00

17 lines
343 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
set -e
MSG="${1:-chore: quick sync}"
# Sassure quon est dans un repo
git rev-parse --is-inside-work-tree >/dev/null 2>&1 || { echo "Pas un dépôt Git"; exit 1; }
# Ajoute, commit et push
git add -A
if ! git diff --cached --quiet; then
git commit -m "$MSG"
else
echo "Rien à committer."
fi
git push
echo "✅ Sync OK"