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

[Bug]: "Pull updates on startup" also commits and pushes

Open Kageetai opened this issue 1 year ago • 5 comments

Describe the bug

Hello,

first, many thanks for this plugin and the work. I would not be able to work without Git in Obsidian :)

One thing I noticed and has become a small nuisance from time to time, though: I have the option "Pull updates on startup" on, as I want to have my latest changes pulled every time. But what I don't necessarily want is to commit/push my latest local changes at the same time. But it seems this is not possible. Below, a screenshot of my current settings around that:

Screenshot 2024-06-12 at 10 40 30

From my understanding of these settings, this should only pull on startup, but not commit/push. But it does so anyway. Would it be possible to adjust that, maybe with a setting?!

Relevant errors (if available) from notifications or console (CTRL+SHIFT+I)

No response

Steps to reproduce

  1. Activate settings as shown above
  2. Restart or reload Obsidian
  3. All previously uncommitted files get committed automatically on startup

Expected Behavior

  • nothing should be committed on startip

Addition context

No response

Operating system

macOS

Installation Method

None

Plugin version

2.24.2

Kageetai avatar Jun 12 '24 08:06 Kageetai

Can you please share your other settings under the "Automatic" heading in the plugin settings?

Vinzent03 avatar Jun 15 '24 19:06 Vinzent03

Here a screenshot of the "Automatic" section:

Screenshot 2024-06-16 at 12 56 12

Kageetai avatar Jun 16 '24 10:06 Kageetai

That's the expected behavior. Or, at least, if you haven't used Obsidian for 6 (360 min) hours. When the last edit is 6h ago, and you start Obsidian, it first pulls because of the "Pull on startup" setting and afterward creates a backup, because of your Auto backup settings.

Vinzent03 avatar Jun 19 '24 18:06 Vinzent03

Unfortunately, it's not just about the backup interval. It also happens if I just did a manual backup and then restart/refresh Obsidian. It then does another backup. Are there any other settings that can influence that?

Kageetai avatar Jun 20 '24 08:06 Kageetai

This is an annoyance. I have three devices I work with and it happens from time to time that on the third device, which I rarely use, files which are out of date are pushed and I "loose" the content. That is "git-legal", which is fine, but I then have to go back to my laptop to sort things out manually.

Two ideas:

  • In some form "git stash, pull, stash pop"? Such that old changes aren't overwritten?
  • "git branch, pull, merge"?

I am writing this right now because that has happened the third time this week already...

dbischof90 avatar Aug 01 '24 06:08 dbischof90

I'm going to close this issue as quite some things have changed since then and I couldn't reproduce the issue.

Vinzent03 avatar Jul 24 '25 23:07 Vinzent03