Skip to content

Create obsidian-rename-note-considiering-git.template.sh#1035

Open
JNBARY wants to merge 1 commit into
raycast:masterfrom
JNBARY:patch-2
Open

Create obsidian-rename-note-considiering-git.template.sh#1035
JNBARY wants to merge 1 commit into
raycast:masterfrom
JNBARY:patch-2

Conversation

@JNBARY
Copy link
Copy Markdown
Contributor

@JNBARY JNBARY commented May 11, 2026

Description

If one tracks his Obsidian Vault via git and renames a note inside the Obsidian-App, the history of the renamed note in git is lost as for git it seems as if the old note has been deleted and a new note with the new name and content of the old note was created instead. The script solves this issue by using git mv to rename the note while at the same time updating all links pointing at the renamed note via the Obsidian CLI.
Running the script will rename the note currently selected in the frontmost Finder window to the name specified while calling the script. All links inside the Obsidian Vault that point at the renamed note will be updated and the version-history of the renamed note will be preserved.

Type of change

  • New script command

Screenshot

Dependencies / Requirements

The user has to specify the path to his Obsidian Vault as vaultPath.

Checklist

If one tracks his Obsidian Vault via git and renames a note inside the Obsidian-App, the history of the renamed note in git is lost as for git it seems as if the old note has been deleted and a new note with the new name and content of the old note was created instead.
The script solves this issue by using git mv to rename the note while at the same time updating all links pointing at the renamed note via the Obsidian CLI.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant