Skip to content

Instantly share code, notes, and snippets.

@bunsyy
Last active July 24, 2024 09:04
Show Gist options
  • Save bunsyy/d06563a40fe3727abd3e54b42018dba3 to your computer and use it in GitHub Desktop.
Save bunsyy/d06563a40fe3727abd3e54b42018dba3 to your computer and use it in GitHub Desktop.
How I initialize Git in Obsidian with Github.

Adding Git to Your Obsidian

  1. Install Obsidian Git Plugin
  2. Setup SSH key
  3. Create a new repository for Obsidian Git
  4. Copy SSH URL
  5. In Obsidian, run command Git: Edit remotes and paste the SSH URL then select ....
  6. In Obsidian, run command Git: Initialize a new repo.
  7. In Obsidian, run command Git: Commit all changes.
  8. Using OS terminal or VSCode terminal, navigate to the vault and run git remote add origin <SSH_URL>.
  9. Using OS terminal or VSCode terminal, navigate to the vault and run git branch -M main.
  10. Using OS terminal or VSCode terminal, navigate to the vault and run git push -u origin main.
  11. In Obsidian, change vault backup interval (minutes) to 5mn and Auto pull interval (minutes) to 5mn.

Subsequent Times

Any subsequent changes, you can just follow this procedure.

  1. Make any changes
  2. Run command Git: Commit all changes.
  3. Run command Git: Push.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment