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]: Merge Conflicts not supported on mobile? #340

Open
tjcampanella opened this issue Oct 16, 2022 · 13 comments
Open

[Bug]: Merge Conflicts not supported on mobile? #340

tjcampanella opened this issue Oct 16, 2022 · 13 comments

Comments

@tjcampanella
Copy link

Describe the bug

When attempting to pull on Obsidian mobile I get an error saying "MergeNotSupportedError: Merge with conflicts is not supported yet". I am unsure if this is a bug or it is just not supported yet like the message says. I saw an issue saying that merges should work on the Obsidian Git Mobile issue. If it is not supported then please let me know how I should handle this. Thanks.

Relevant errors (if available)

No response

Steps to reproduce

I have automatic pull enabled so when I startup Obsidian it attempts to pull down the changes however, it fails with a MergeNotSupportedError. I am unsure exactly what I did to cause this I assume I made some changes on my phone without syncing with my computer so things must have gotten out of sync.

Expected Behavior

No response

Addition context

No response

Operating system

iOS

Plugin version

2.6.0

@glassoff
Copy link

glassoff commented Oct 25, 2022

I have the same problem: I've got conflict on mobile and now can't make pull and as I right understand there are not in mobile ways to resolve conflicts :(
At least it would be enough to have ability to open conflict file for manual conflict resolving.

@Vinzent03 you had discussion about conflicts in mobile version here Maybe our case helps you to resolve problem?

@thebrianbug
Copy link

I'm seeing this error as well and I'm not sure what to do

@Vinzent03
Copy link
Owner

Sorry, but I can't reproduce. Are you sure you have the same root history? So the histories are not completely divergent?

@thebrianbug
Copy link

Ah, I see that I had the merge strategy set to rebase for my desktop and merge on my phone. Git has problems when trying to mix strategies. Trying both to "merge" to see if that's better

@J-Emmerich
Copy link

I was having the same issue with a fresh git install that I did in a new laptop.
With my old laptop I had no issue to sync the mobile.
I reinstalled git and pushed a new file to the repository with plain git and the mobile synced fine. Then I installed obsidian-git and it started to work. :)

@RedHotUnicorn
Copy link

I have the same error. Laptop and iOS have merge strategy.

After trying "pull" I have message "MergeNotSupportedError"
After trying "push" I have message
"PushRejectedError: Push rejected because it was not a simple fast-forward. Use, "force: true" to override."

@nirmalhk7
Copy link

I also have the same problem: I made the changes on my laptop yesterday and opened Obsidian on my mobile today.
Seems like Obsidian ignored my changes on my laptop and simply pushed back to remote (wasn't a force push because the files I added on the laptop were shown as deleted). I tried to force push from my laptop, and voila: now when I open my phone I get a "MergeNotSupportedError".

@Chiaoso
Copy link

Chiaoso commented Jan 22, 2023

same problem on my Android phone.
push: buffer error
pull: MergeNotSupportedError.
Anyway, I solved it through re-cloning the whole repo and restricting my operation on different divices.

@freeman-jiang
Copy link
Contributor

freeman-jiang commented Jan 29, 2023

Following this as well, is there no way to resolve merge conflicts on mobile? I suppose that adding a sort of git reset --hard command to mobile would solve many problems.

@sickerin
Copy link

One workaround is as follows:

  1. download iSH on the App Store (or other terminal emulators).
  2. apk add git
  3. mkdir -p /mnt/Obsidian
  4. mount -t ios null /mnt/Obsidian then a popup will show, add the Obsidian vault location.
  5. perform other git commands like reset, or try to resolve merge conflicts

Resources: link link2

Apps like Working Copy might work where you can add local repos, but I think it's a premium feature.

Not sure if like merge commits or rebases have caused pulling to stop working on my iPad, I remember seeing sth like only fast forwarding is recommended or sth.

@sammorley-short
Copy link

sammorley-short commented Feb 19, 2023

I have the same issue regularly, but here's how I solve it:

  1. On your mobile device, commit all changes to main.
  2. Create a branch called mobile and switch to it.
  3. On a non-mobile device running the same git repo, create a branch called mobile at the first commit of the repo, then push it to the remote (with branch name mobile.
  4. On your mobile device, push the mobile branch to get the current vault's state on the remote.
  5. On your other device, rebase the conflicting main onto mobile, resolve any conflicts, and then fast-forward mobile to the new main.
  6. On your mobile device, switch to main and pull the updated, resolved main. You now have resolved the conflict and both devices share the same main state.
  7. (Optional) delete the mobile branches on both devices and the remote.

(7 is optional because I have found it useful to maintain the mobile branch as a record of the last guaranteed point of agreement across clients, which means you don't have to reset to the initial commit if you need to repeat this process in the future.)

Hope this helps, good luck out there, and remember: commit early and often! 🚀

@stevector
Copy link

Thanks @sammorley-short! This work-around worked for me.

@wangyandongnx
Copy link

One workaround is as follows:

  1. download iSH on the App Store (or other terminal emulators).
  2. apk add git
  3. mkdir -p /mnt/Obsidian
  4. mount -t ios null /mnt/Obsidian then a popup will show, add the Obsidian vault location.
  5. perform other git commands like reset, or try to resolve merge conflicts

Resources: link link2

Apps like Working Copy might work where you can add local repos, but I think it's a premium feature.

Not sure if like merge commits or rebases have caused pulling to stop working on my iPad, I remember seeing sth like only fast forwarding is recommended or sth.

Thanks. This really helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests