obsidian-git icon indicating copy to clipboard operation
obsidian-git copied to clipboard

Conflict with the Banners Plugin and using Obsidian Git across OS[Bug]:

Open TheAussieTinker opened this issue 3 years ago • 1 comments

Describe the bug

So if I have the banner frontmatter in a note and edit the note on my MacBook I can successfully push it to GitHub. When I use git bash to pull it on my windows computer it is successful and the note is completely as expected. However, when I open obsidian or do the pull via obsidian, the notes I edit on my MacBook and have a banner in the frontmatter, all of a sudden have this at the top of the file (as per the photo):

---
banner: "![[Banner.png]]"
---

Or whatever image is linked. This wrecks the rest of the frontmatter for the file. I have checked the files with vs code as well as the raw files on GitHub it only occurs after I open Obsidian on my windows 10 machine. This issue does not happen when I edit a file on my windows machine, push it, pull it and open it up on the MacBook.

I have tried restarting, reinstalling both banners and obsidian git, and changing the banner frontmatter field name.

Other info: I sync basically everything across the devices except for .obsidian/workspace as I want all the same settings across devices

Something I have noticed is that on my Macbook it says

Everything is up to date
No changes to commit
No changes to push

Whereas on windows it says:

No changes to commit
No changes to push
Everything is up to date

So maybe the issue lies with the order of operations but I have checked the settings and both are set to pull changes before pushing

image

Relevant errors (if available)

Copying banner frontmatter to start of file

Steps to reproduce

  1. Edit a file with a banner on my MacBook and push it to github
  2. Open Obsidian on my windows machine and open the edited file after it has pulled the changes
  3. The issue is present

Expected Behavior

Not copying the banner frontmatter

Addition context

No response

Operating system

Windows

Plugin version

1.26.1

TheAussieTinker avatar Jul 10 '22 14:07 TheAussieTinker

If I comment out the banner frontmatter via adding this in front of it: [//] # The problem goes away so I am quite sure it is a conflict between obsidian git and banners on windows

TheAussieTinker avatar Jul 10 '22 14:07 TheAussieTinker

The issue might come, that the Banners plugin thinks it's a new created file. Although it's an existing file pulled. Closing this as I can't do anything about it.

Vinzent03 avatar Aug 23 '22 14:08 Vinzent03