Skip to content

Can't Switch Branches on Desktop #9434

Closed

Description

@mginham

Describe the bug

When I attempt to switch branches on Desktop, it will just continuously loop "Switching to branch" but never actually transition. If I close Desktop and open it up again, it will still be on the original branch. It doesn't matter what branch I try to switch to, none of them work. It also loops if I try to create a new branch.

Version & OS

Version 2.4.0
Windows 10

Steps to reproduce the behavior

  1. Open Desktop
  2. Click "Current Branch"
  3. Select any other branch (or select New Branch)
  4. "Switching to branch" will loop infinitely in the "Current Branch" rectangle

Expected behavior

It should transition to the other branch.

Actual behavior

It loops forever, displaying "Switching to branch".

Screenshots

Add screenshots to help explain your problem, if applicable.
githubLoop

Logs

2020-03-18.desktop.production.log
2020-03-19.desktop.production.log
Attach your
2020-02-09.desktop.production.log
logs by opening the Help menu and selecting Show Logs..., if applicable.
2019-01-11.desktop.production.log

2020-03-24.desktop.production.log
2020-03-30.desktop.production.log
2020-03-31.desktop.production.log
2020-04-01.desktop.production.log
2019-01-01.desktop.production.log
2019-01-03.desktop.production.log
2019-01-04.desktop.production.log

Additional context

Add any other context about the problem here.

Activity

  1. steveward commented on Apr 2, 2020

    @steveward
    Contributor

    @mginham thanks for sharing the log files. It looks like you ran into some line ending issues -- did you see all of the files in your repositories changes, and then commit those changes? We have a help document that gives some line ending recommendations, which I would recommend taking a look at. If you have any questions about that let me know.

    It looks like you were able to commit some of those changes, but then this interesting error was thrown:

    2020-04-01T20:03:56.174Z - error: [ui] Could not load old contents for syntax highlighting
    Error: Git returned an unexpected exit code '128' which should be handled by the caller.'
    

    Next this error was thrown:

    2020-04-01T20:09:54.696Z - error: [ui] `git -c credential.helper= -c protocol.version=2 checkout --progress origin/CustomizationAndProgress -b CustomizationAndProgress --` exited with an unexpected code: 1.
    stderr:
    error: Your local changes to the following files would be overwritten by checkout:
    	SE2250-GroupProject-branchTest/Library/PackageCache/[email protected]/Tests/Runtime/GetCurrentRTTCallDoesntCrashWhenUseWebSockets/Resources/GetCurrentRTTCallDoesntCrashWhenUseWebSockets_PlayerPrefab.prefab
    	SE2250-GroupProject-branchTest/Library/PackageCache/[email protected]/Tests/Runtime/GetCurrentRTTCallDoesntCrashWhenUseWebSockets/Resources/GetCurrentRTTCallDoesntCrashWhenUseWebSockets_PlayerPrefab.prefab.meta
    Please commit your changes or stash them before you switch branches.
    Aborting
    

    This error is Git preventing you from switching branches due to uncommitted changes potentially being lost. Have you attempted to commit the changes to these two files? Did you possibly previously stash any uncommitted changes?

  2. added
    more-info-needed
    on Apr 2, 2020
  3. tierninho commented on Apr 14, 2020

    @tierninho
    Contributor

    @mginham As we have not heard back from you on this issue, we are closing it for now. Should you have any more details or questions, please reach out and we will be happy to help. Thank you.

  4. hoeschenbd commented on May 11, 2020

    @hoeschenbd

    I am able to reproduce this when --skip-worktree has been applied to ignore a file and then trying to switch to a different branch. A workaround is to use --no-skip-worktree before switching branches. Could this bug be re-opened?

  5. tierninho commented on Jul 7, 2020

    @tierninho
    Contributor

    Closing this in favor of an earlier bug report here: #9297

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    more-info-needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions