sync: 2026-09-18 11:28
This commit is contained in:
1 parent
c72314f438
commit
6e81f3648d
4 files changed
+13
-3
No files matched your search
@@ -0,0 +1 @@
|
|||||||
|
,benji,IFP3251245,18.09.2026 11:26,file:///home/benji/.config/libreoffice/4;
|
||||||
Binary file not shown.
Binary file not shown.
@@ -3,10 +3,16 @@
|
|||||||
TARGET_DIR="$HOME/Documents/COURS"
|
TARGET_DIR="$HOME/Documents/COURS"
|
||||||
|
|
||||||
# Navigate to target directory
|
# Navigate to target directory
|
||||||
cd "$TARGET_DIR" || { echo "Directory not found"; exit 1; }
|
cd "$TARGET_DIR" || {
|
||||||
|
echo "Directory not found"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
# Pull remote changes rebase-style to prevent messy merge commits
|
# Pull remote changes rebase-style to prevent messy merge commits
|
||||||
git pull --rebase --autostash || { echo "Git pull failed"; exit 1; }
|
git pull --rebase --autostash || {
|
||||||
|
echo "Git pull failed"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
# Stage all files
|
# Stage all files
|
||||||
git add -A
|
git add -A
|
||||||
@@ -14,7 +20,10 @@ git add -A
|
|||||||
# Commit only if there are actual changes staged
|
# Commit only if there are actual changes staged
|
||||||
if ! git diff-index --quiet HEAD --; then
|
if ! git diff-index --quiet HEAD --; then
|
||||||
git commit -m "sync: $(date +'%Y-%m-%d %H:%M')"
|
git commit -m "sync: $(date +'%Y-%m-%d %H:%M')"
|
||||||
git push || { echo "Git push failed"; exit 1; }
|
git push || {
|
||||||
|
echo "Git push failed"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
else
|
else
|
||||||
echo "No changes to commit."
|
echo "No changes to commit."
|
||||||
fi
|
fi
|
||||||
Reference in new issue
Block a user