Skip to content

[Bug]: IOS Infinite Loop: "Couldn't find master" after cloning, and "Switch branch" fails to resolve it #1012

@ahmed-abdelwahed1

Description

@ahmed-abdelwahed1

Describe the bug

I am trying to clone my remote repository on iPhone (iOS). The repo works perfectly on Windows and Linux (synced via Obsidian Git).
After successfully authenticating and running the Clone existing remote repo command, the plugin enters a broken state. It keeps throwing "Couldn't find master" and "No upstream branch is set" errors.

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

Steps to reproduce

  1. Create a fresh Vault on iOS.
  2. Install Obsidian Git plugin.
  3. Run command: Git: Clone existing remote repo.
  4. Enter repo URL and PAT.
  5. Select Vault Root -> Delete all local config.
  6. The clone appears to finish, but then prompts to select a branch or shows "No upstream branch is set".
  7. I use the available "Switch branch" command.
  8. I select origin/main (or even origin/master which I created specifically to fix this).
  9. Error: It immediately fails with "Couldn't find master".

Expected Behavior

The "Switch branch" command should successfully checkout the selected branch (main) and sync the files.

Addition context

No response

Operating system

iOS

Installation Method

None

Plugin version

2.36.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions