I generally add workspace.json
to the .gitignore
, since any time you change the UI state e.g. open a drawer or change the size of a side bar, this file will be updated. However, ignoring it also means that any time you clone the vault somewhere else, you’ll have to setup your UI again.
Using update-index --skip-worktree
should be able to fix this:
That last line basically tells git to ignore all future changes, despite it being added to the repository. Basically snapshotting it.
To undo this we can then run:
Then you can go back to committing the file. Once you’re happy you can once again freeze the file with —skip-worktree.
Note
If the file gets changed on remote and you try to pull, you will need to unfreeze, discard/commit/stash changes, pull, refreeze. (that being said, I use pull with rebase, if you use merge, this might not be an issue)