- Create a Github Account (eg. MyGithubsUserName) - this will be shared among your collaborators
- Create a Private Repository (eg. MyFolderFor_Obsidian)
- On your local machine open the terminal to the folder where you want to store the notes
- Once the terminal is open type in git clone https://MyUserName:MyPasswordfortheaccount@github.com/MyUserName/MyFolderFor_Obsidian.git replace the placeholders i have put with your username password and foldername in github
- Install Github Desktop- only available for Windows and Mac. The other way to do this is through the terminal which I haven't figured out yet
- Open Obsidian (assuming you have installed it already) - on the left hand bar there should be a "Open a New Vault"
- There choose "Open folder as Vault" and choose the folder from step 3. This should Create a new folder for notes you want to collaborate on. Just for testing purposes create a new note
- Open and login to Github Desktop. When it asks to add a repository. Choose "Add an existing Repository" and go to the folder from step 3
- On the left side you should see the new file you created come up as changes
- On the top you'll see "Fetch Origin" click that to pull any changes that other have made to the github repository. Do that.
- If you are satisfied with the changes - On the left you'll see "commit to main". click that with the necessary comments
with this method is that two people cannot work on the same file together. to solve this
- On Github Desktop, you'll see an option called current branch, open that and create a new branch under your name - this is the branch you will always commit to. it creates a different version of the vault
- I'm not sure what a good time to merge is- but i'm hoping that once you look at main and see that there are no new changes to that particular file you have made, you can merge yournamebranch into main
for merging you can see an option under "Current Branch"
- (From 7) Once installed, Obsidian will ask you if you want to install community plugins, say yes then go to Settings>Community Plugins and switch on all the plugins you use
Actions to perform
- Commit -> Push to Origin - sends your changes to the web version of your github folder
- Fetch Origin - updates your local github folder by copying what new things are there on the web version of the github folder
- Merge yourbranchname into main - brings your changes from your branch to the main branch
- after testing, i Think the best way to work with a team is to start every session of writing by fetching from origin in the beginning.
- If there is a conflict, stash changes is a good option
- While working commit every hour or halfhour
- Possibilities: Cron jobs to backup local copy every 5 minutes and every 50 mins and every 48 hours.