Last active
March 7, 2026 06:49
-
-
Save saikotek/a590810d0d60ad41c3b0750270d22394 to your computer and use it in GitHub Desktop.
Revisions
-
saikotek revised this gist
Feb 20, 2025 . 1 changed file with 10 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -44,7 +44,9 @@ Create `.gitignore` file in your vault directory: # Obsidian system files .obsidian/cache/ .obsidian/workspace.json .obsidian/workspace-mobile.json .trash/ .DS_Store # LiveSync Plugin (if using) .obsidian/plugins/obsidian-livesync/data.json @@ -53,6 +55,12 @@ Create `.gitignore` file in your vault directory: # Obsidian Sync (if using) .obsidian/sync.json # Optionally, exclude all of obsidian settings from Git # .obsidian/ # Optionally, exclude all of plugin settings from Git # .obsidian/plugins ``` Add and commit `.gitignore`: @@ -73,7 +81,8 @@ git push -u origin main ### 5. Setup Automated Backups (Optional) - Install obsidian-git plugin: https://github.com/Vinzent03/obsidian-git - Then in plugin settings set desired Vault backup interval and Auto pull interval. - Disable auto-pull on startup, because Obsidian Sync/Livesync also pulls on startup - I recommend enabling this only on your main device to avoid potential conflicts ### 6. Setup your Sync solution -
saikotek revised this gist
Dec 16, 2024 . 1 changed file with 9 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ # Setting Up Obsidian Sync (or Livesync or Remotely Save) with Separate Git Backup This guide describes how to set up an Obsidian vault that syncs across devices while maintaining a separate Git backup without interfering with the sync mechanism. This guide should work with either official Obsidian Sync solution or with unofficial sync plugins like [Obsidian Livesync](https://github.com/vrtmrz/obsidian-livesync) or [Remotely Save](https://github.com/remotely-save/remotely-save). ## Prerequisites - Git installed on your system @@ -74,7 +74,13 @@ git push -u origin main - Install obsidian-git plugin: https://github.com/Vinzent03/obsidian-git - Then in plugin settings set desired Vault backup interval and Auto pull interval. - I recommend enabling this only on your main device to avoid potential conflicts ### 6. Setup your Sync solution - Either enable official Obsidian Sync - Or use one of the following plugins: - Obsidian LiveSync (quick guide [here](https://github.com/vrtmrz/obsidian-livesync?tab=readme-ov-file#3-minute-setup---couchdb-on-flyio)) - Remotely Save (usage guides [here](https://github.com/remotely-save/remotely-save?tab=readme-ov-file#usage)) ## Usage -
saikotek revised this gist
Dec 16, 2024 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ # Setting Up Obsidian Sync with Separate Git Backup This guide describes how to set up an Obsidian vault that syncs across devices while maintaining a separate Git backup without interfering with the sync mechanism. @@ -74,6 +74,7 @@ git push -u origin main - Install obsidian-git plugin: https://github.com/Vinzent03/obsidian-git - Then in plugin settings set desired Vault backup interval and Auto pull interval. - I recommend enabling auto-push only on your main device to avoid potential conflicts ## Usage -
saikotek renamed this gist
Dec 15, 2024 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
saikotek revised this gist
Dec 15, 2024 . 1 changed file with 1 addition and 3 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -111,6 +111,4 @@ git push -u origin main 2. If sync conflicts occur: - Let Obsidian sync handle file conflicts - Use Git for version control and recovery only -
saikotek revised this gist
Dec 15, 2024 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -72,8 +72,8 @@ git push -u origin main ### 5. Setup Automated Backups (Optional) - Install obsidian-git plugin: https://github.com/Vinzent03/obsidian-git - Then in plugin settings set desired Vault backup interval and Auto pull interval. ## Usage -
saikotek created this gist
Dec 15, 2024 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,116 @@ # Setting Up Obsidian with Separate Git Backup This guide describes how to set up an Obsidian vault that syncs across devices while maintaining a separate Git backup without interfering with the sync mechanism. ## Prerequisites - Git installed on your system - Obsidian installed - Either Obsidian Sync subscription or LiveSync plugin configured - Basic familiarity with command line ## Setup Steps ### 1. Initial Setup ```bash # Create directories if they don't exist mkdir -p ~/Documents/Vault.git # For Git repository mkdir -p ~/Documents/Vault # For your vault ``` ### 2. Git Configuration #### For a New Vault: ```bash # Initialize Git with separate directory git init --separate-git-dir=$HOME/Documents/Vault.git ~/Documents/Vault ``` #### For an Existing Vault with Git: ```bash cd ~/Documents/Vault # Backup existing .git directory cp -r .git ~/Documents/Vault.git.backup # Move Git directory to new location mv .git ~/Documents/Vault.git # Create gitfile pointing to new location echo "gitdir: $HOME/Documents/Vault.git" > .git ``` ### 3. Git Ignore Configuration Create `.gitignore` file in your vault directory: ``` # Obsidian system files .obsidian/cache/ .obsidian/workspace.json .trash/ # LiveSync Plugin (if using) .obsidian/plugins/obsidian-livesync/data.json .obsidian/plugins/obsidian-livesync/*.realm* .obsidian/plugins/obsidian-livesync/realms/ # Obsidian Sync (if using) .obsidian/sync.json ``` Add and commit `.gitignore`: ```bash git add .gitignore git commit -m "Add .gitignore for Obsidian" ``` ### 4. Configure Remote Repository ```bash # Add your remote repository git remote add origin <your-repository-url> git branch -M main git push -u origin main ``` ### 5. Setup Automated Backups (Optional) Install obsidian-git plugin: https://github.com/Vinzent03/obsidian-git Then in plugin settings set desired Vault backup interval and Auto pull interval. ## Usage - Continue using Obsidian normally with sync enabled - Git operations will work as usual from your vault directory - All Git metadata is stored separately in `~/Documents/Vault.git` - Your vault stays clean while maintaining version control ## Additional Tips 1. **Multiple Devices**: When setting up on additional devices: ```bash # Clone the repository with separate Git dir git clone --separate-git-dir=$HOME/Documents/Vault.git <repository-url> ~/Documents/Vault ``` 2. **Checking Setup**: ```bash # Verify Git configuration cat ~/Documents/Vault/.git # Should show path to separate Git dir git status # Should work normally ``` 3. **Recovery**: - Obsidian sync/LiveSync handles day-to-day synchronization - Git serves as a backup system and version control - In case of sync issues, you can always fall back to Git ## Troubleshooting 1. If Git commands don't work: - Check if the gitfile path is correct - Ensure the separate Git directory exists - Verify permissions on both directories 2. If sync conflicts occur: - Let Obsidian sync handle file conflicts - Use Git for version control and recovery only Remember to regularly verify that both sync and Git backup are working as expected by checking the sync status in Obsidian and running `git status` periodically.