Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: wrong order in git backup #718

Open
LFSaw opened this issue Apr 9, 2024 · 3 comments
Open

[Bug]: wrong order in git backup #718

LFSaw opened this issue Apr 9, 2024 · 3 comments
Labels
awaiting response Cannot work on issue until response from an author of an issue bug Something isn't working

Comments

@LFSaw
Copy link

LFSaw commented Apr 9, 2024

Describe the bug

Merge conflicts when doing Git: Create backup in a 2 machine scenario

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

No response

Steps to reproduce

  • 2 instances of obsidian vault on different machines (A , B), each with the same obsidian-git settings (apart from machine ID)
  • edit the same file on machine A and B
  • Git: Create backup on machine A
  • Git: Create backup on machine B

results in merge conflict.

Expected Behavior

no merge conflict.

This could be achieved by a git command sequence within Git: Create backup:

  1. git commit
  2. git pull [--rebase]
  3. git push

Addition context

No response

Operating system

macOS

Installation Method

None

Plugin version

2.24.1

@LFSaw LFSaw added the bug Something isn't working label Apr 9, 2024
@Vinzent03
Copy link
Collaborator

I don't think this is an issue with the plugin. You just create a merge conflict, which the plugin can't solve more than git. You can set rebase to be used when pulling in the settings.

@LFSaw
Copy link
Author

LFSaw commented Apr 9, 2024

Thanks for taking the time looking into this!

I'd just like to have configuration in which I can save changes from both machines (as in the above scenario) in one action (per machine) without creating a merge conflict.
I just tried using the "rebase" setting; unfortunately this does not change that I get an error message, however, it seems not to create a merge conflict...

The sequence

  1. edit file example.md on machine A
  2. edit file example.md on machine B (different edit)
  3. Git: Create backup on machine A
  4. git commit on machine B
  5. git pull --rebase on machine B
  6. git push on machine B

works for me without a merge conflict and without an error (given that an automatic merge is possible).

@Vinzent03
Copy link
Collaborator

Please share your error messsage. So you are editing the file in two different places, right?

@Vinzent03 Vinzent03 added the awaiting response Cannot work on issue until response from an author of an issue label May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting response Cannot work on issue until response from an author of an issue bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants