// How I set up Obsidian...
Hey Hackers! If you haven't heard of Obsidian, than you've probably been living under a rock. Obsidian is a markdown note taking app that helps you build out your second brain. It is a really cool app that I personally use and wanted to share with you. So no, they did not sponsor anything I am saying.
// Video Tutorial:
If you don't want to read and follow along, there is a video tutorial I will attach below.
//Extensions That I Use:
Obsidian Git
Advanced Tables
Sliding Panes
Calendar
//Git Syncing:
We can back up our obsidian notes to a GitHub repository. Through this, we can save all of our notes to a remote server as well as having them be synced between devices. To start, we create a private git repository [unless if you wish for it to be public]. We will call this repository `vault` but feel free to call it whatever you wish.
To securely sync content with our repository, we can create a Personal Access Token [PAT] to serve as a key, so that way we don't send off our GitHub user credentials. To create a token, navigate to this link. Generate a new token with `repo` capabilities. Although you may choose your expiration date, i do not suggest giving it no expiration date [for security reasons].
//Creating Obsidian Vault:
Open obsidian and create a new vault. We will call our vault "vault", but feel free to call it whatever you wish. Once created, we need to initialize or repository with git for syncing functionality.
git init vault
We can now add a file to test if our syncing abilities are working properly:
cd vault
touch README.md
Lets create a commit and send it to our git repository.
git add .
git commit -m "first commit"
git branch -M main
git remote add origin https://PAT@github.com/USERNAME/REPOSITORY.git
git push -u origin main
PAT = Personal Access Token
USERNAME = GitHub Username
REPOSITORY = Name of repository, in this example it would be vault
//Obsidian Git Plugin:
Now that we know that we can commit to the remote repository, let's automate this process with obsidian git. Go to your settings and in the options toolbar, click Community plugins. In order to access these plugins we must disable Safe mode. With this disabled, we can now explore the community plugins available to us.
Search for obsidian git and install it to our vault. Navigate to the settings and in the toolbar click Obsidian Git.
Title | Settings |
Vault backup interval | 5 |
commit message | OSNAME {{date}} |
{{date}} placeholder | YYYY-MM-DD |
Current branch | main |
Pull updates on startup | True |
Pull changes before push | True |
Show status bar | True |
OSNAME = name of OS or computer
//Adding Keyboard Shortcuts:
In obsidian, we can add custom keyboard shortcuts to quickly push and pull content. Navigate to the settings, and in the toolbar, click on Hotkeys. Search for git and set the following preferences:
Title | Setting | Git command |
Obsidian Git: Create backup | "alt" + "p" | git push |
Obsidian Git: Pull from remote repository | "alt" + "l" | git pull |
So now, when we hit alt + p, we push to the repository. When we hit alt + l, we pull from the repository.
//Syncing:
Obsidian does have the ability to sync across devices, but you do have to pay for it. But using git we can sync across devices for free. To sync these notes with other devices, simply just repeat the same process on another computer. But, instead of creating a repository, we can just clone our existing one and add the remote origin if needed. Thanks for reading, and as always,
Happy Hacking!
// Socials:
© 2022 by Cosmodium CyberSecurity LLC
Comentários