17 lines
343 B
Bash
Executable File
17 lines
343 B
Bash
Executable File
#!/bin/bash
|
||
set -e
|
||
MSG="${1:-chore: quick sync}"
|
||
|
||
# S’assure qu’on 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"
|