Day:1
This commit is contained in:
16
sync2.sh
Executable file
16
sync2.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/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"
|
||||
Reference in New Issue
Block a user