Current Git Branch on a Note?

What I’m trying to do

I have a git repo that has an obsidian vault inside of it.
I’m trying to figure out how to show the name of the current git branch I’m on inside of a note. How would I be able to do that?

Things I have tried

To be honest I’m not even sure what direction to go in. I first thought that running a simple shell command like git status and then parse the output might work but I’m not familiar with how shell commands/scripts can be run in Obsidian.

Any help would be extremely appreciated!!!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.