Setup Token
Preferences Access tokens Add new token Be sure to copy it and save it once you get it. You will never see it again.
Git Setup
https://andrewwegner.com/obsidian-gitlab-setup.html
- cd into your obsidian note folder
- Make a
.gitignore
file with the following data:
.obsidian/*
!.obsidian/app.json
!.obsidian/appearance.json
!.obsidian/config
!.obsidian/community-plugins.json
!.obsidian/core-plugins.json
!.obsidian/graph.json
!.obsidian/hotkeys.json
- Initialize repository like such:
git init --initial-branch=main
`git remote add origin https://gitlab.com/Yoshixi/calculus12-notes.git`
git remote set-url origin https://<username>:<token>@gitlab.com/Yoshixi/reponame
git add .
git commit -m "Initial Commit"
git push --set-upstream origin main
Troubleshooting
If you cannot git push, then try:
git pull origin main --allow-unrelated-histories
and then push.
Obsidian Git Plugin
Be sure to install the Git
plugin
Setup Vault backup intervals
And the commit author too.