Howdy! I just recently started using Obsidian after switching from ROAM research and one problem I wanted to solve immediately was backing up my files! With a lot of help from the community, particularly @foreveryone on the discord community, I managed to get Obsidian Git working. It took me probably 2 hours of troubleshooting and a lot of sadness, but hopefully having something like this on the forums will make it easier for other people who are swapping to Obsidian.
What you’ll need upfront!:
- Git Desktop
-
GitHub (by this I mean make a GitHub account)
- Obsidian (duh lol)
- The Obsidian Git Plugin!
-
Git (Go to the website and download it)
–Downloading the Obsidian Git plugin workflow (assuming you already have a vault)–
- Open your obsidian vault
- Go to the cogwheel on the bottom left of the screen that says settings and click on it
- Select the community plugins option.
- Turn safe mode off
- Browse community plugins and search for Obsidian Git by Denis Olehov
- Install Obsidian Git
- Go back to the community plugins tab and enable obsidian git.
- Select Obsidian Git from the plugin options
- Enable Pull updates on startup
10.** Disable the “disable push” option (haha double negative)** CRUCIAL.
The next step is the hardest and it involves creating a new GitHub repository and connecting that GitHub repository to your local vault! Make sure you already made a GitHub account before this step. your credentials are important
–Connecting Github Repository to Local Obsidian Vault–
1. Download Git Desktop. (This will be used to connect your local vault to the online GitHub repository)
-
The first git desktop screen you see will prompt you to “sign in to GitHub.com.” Sign in and use your git hub info
- If you’re already logged into Github it will open it in a browser and just ask you for your password
- If you sign in correctly you’ll be asked to authorize the desktop/laptop you’re on and Git desktop will then reopen
- It will also give you a choice of email to use (either a personal one you use when you made the online GitHub account or an autogenerated one). Either is fine.
-
This next step is about creating a repository on GitHub and connecting it to git desktop
- First step is to go back to github.com
- Create a new private repository and name it whatever you want
- Make sure you don’t select any of the options to initialize the repository. Not even the readme file.
- Click the green button that says create a repository
- You’ll see 4 options for creating a repository. Click the “set up in desktop” option.
- Git desktop will open up and you can then click the blue “clone” button.
- Now you have made an empty repository on GitHub! HALFWAY THERE WOOHOO!!!
-
**This last step is about pointing your git desktop repository to your local Obsidian vault! **
- From git desktop click on the “show in explorer” button in your empty repository.
- This should open up the location of the git repo on your local device! We want to move some files from this folder to your obsidian folder!
- Go to the “view” option near the top left of your file explorer
- Select “options” (should be the furthest right of all your choices in the view box)
- From “options” click on the “view tab”
- Turn the “hidden files and folders” option to “show hidden files, folders, and drives” and select ok.
- You should now be able to see the previously hidden .git folder in your local repo!
- Copy this .git folder to your local obsidian vault. It is fine to have the .git folder in both places. This is super important because it is what allows the Obsidian Git extension to do its job.
-
Now that you have your .git metadata in your Obsidian vault you can go to obsidian, open up the command palette with (Ctrl + P) and type in Obsidian Git.
- You should then click on the “Commit all changes and push to remote repository” option.
- You should get a prompt from the Obsidian Git plugin in Obsidian letting you know that your files within the local obsidian vault are being transferred to your remote repository
-
Final step is to check your GitHub repo and see if it has updated!
Once again, a huge thanks to the Obsidian discord and @foreveryone for helping me with this workflow! If you have any questions feel free to ping me on the discord and I’ll do my best to help you!