TIL: git update-index –skip-worktree <filename>

TIL about this option.

git update-index --skip-worktree .obsidian/workspace.json

I have obsidian on multiple machines synced via git and I’m always wrestling with .obsidian/workspace.json conflicts, and today I thought enough is enough and I ought to fix this.

Looks like with this option, I can set it so that local changes are persisted even if the remote file has changed.

Leave a Comment

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply