Last active
August 8, 2023 03:14
-
-
Save naranyala/41460580373a028db9e8bac61c60a475 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Obsidian Sync | |
# works on desktop and mobile (termux) | |
# simply run `sh bin/sync_obsidian.sh` | |
echo "-- start obsidian sync ..." | |
git add . | |
git commit -m "Obsidian sync at $(date)" | |
git pull origin main | |
if [ $? -ne 0 ]; then | |
echo "-- Git Merge Conflict DETECTED!!!" | |
exit 1 | |
fi | |
git push origin main | |
echo "-- sync success ..." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment