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

Switching to a branch with submodules is not possible #18821

Closed
enumag opened this issue Jun 11, 2024 · 2 comments
Closed

Switching to a branch with submodules is not possible #18821

enumag opened this issue Jun 11, 2024 · 2 comments
Labels
bug Confirmed bugs or reports that are very likely to be bugs priority-2 Bug that affects more than a few users in a meaningful way but doesn't prevent core functions

Comments

@enumag
Copy link

enumag commented Jun 11, 2024

The problem

The issue has been reported 3 years ago in #13016 and mistakenly closed as duplicate of #9174 while it is in fact a separate and still existing bug.

If GitHub Desktop cloned a repository on a branch without submodules, when attempting to switch to a branch with submodules, GitHub Desktop throws the following error:

fatal: not a git repository: ../.git/modules/<submodule name>
fatal: could not reset submodule index

Release version

3.6.1

Operating system

Windows 11

Steps to reproduce the behavior

  1. Create a repository with a default branch set to a branch without any submodules.
  2. Create a branch in the repository and add a submodule to it.
  3. Switch back to the default branch without submodule.
  4. Checkout this repository with GitHub Desktop. It should checkout the default branch without submodules.
  5. Try checking out the submodule branch. GitHub Desktop should throw the error mentioned at the top of this page.

Log files

Can't share them publicly because I noticed it on a private repository. It should be easy to reproduce though.

Screenshots

image

Additional context

No response

@steveward steveward added bug Confirmed bugs or reports that are very likely to be bugs priority-2 Bug that affects more than a few users in a meaningful way but doesn't prevent core functions labels Jun 13, 2024
@steveward
Copy link
Member

Thanks for opening this @enumag.

@steveward
Copy link
Member

Closing this as a duplicate of #18673.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs priority-2 Bug that affects more than a few users in a meaningful way but doesn't prevent core functions
Projects
None yet
Development

No branches or pull requests

2 participants