question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't switch to another branch after creating new branch

See original GitHub issue

Describe the bug

In a branch called ‘nonprod’, I have code changes. I create a New Branch ‘X’, based on ‘nonprod’, then I bring changes over to the new branch ‘X’. I click on ‘nonprod’ to switch back over, click on ‘Leave changes’ in the branch ‘X’, but the branch remains ‘X’ and not the desired ‘nonprod’.

I tested this on 2 repos, the same thing happens. I can’t get to my previous branch.

Version & OS

Version 2.5.7 Windows 7

Steps to reproduce the behavior

  1. Have uncommitted new code, then go to Branch.
  2. Click on New Branch.
  3. Create branched based on current branch.
  4. Click on Create branch.
  5. Click on Bring changes over.
  6. New branch is created.
  7. Try to go to a different branch.
  8. Click on Current branch dropdown.
  9. Select another branch.
  10. Click on Leave my changes.
  11. Click on Switch branch.

Expected behavior

When I create a new branch, I expect to be able to go to other branches afterwards, even without committing the new code.

Actual behavior

I can’t go to other branches after I create a new branch with uncommitted code in it.

Logs

Attach your logs by opening the Help menu and selecting Show Logs..., if applicable.

2020-11-16.desktop.production.log

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
KrisBNelsoncommented, Nov 25, 2020

Well, that worked @steveward . I don’t know why. Setting up the mail and username, followed by the commit, both done in the command line, seems to have resolved the commit issue, where as doing the mail and username in command line only and committing in the GUI didn’t work. Thanks for the help.

0reactions
KrisBNelsoncommented, Nov 23, 2020

@steveward I have local user directory, where I deleted Github Desktop folders when I previously uninstalled. I did the config via command line and then the GUI for committing, but that didn’t resolve the issue permanently either. Next time I commit I guess I can try the cmd method, but doubt that will change anything either.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why can't I switch to another Github branch? - Stack Overflow
With --track you create a local branch. It depends on the git version whether you have to add --track or not (from Git...
Read more >
How To Switch Branch on Git - devconnected
A quick way of switching branch on Git is to use the “git switch” command and specify the name of the branch you...
Read more >
Manage Git branches | IntelliJ IDEA Documentation - JetBrains
In the Branches popup, choose New Branch or right-click the current branch in the Branches pane of the Git tool window and choose...
Read more >
Solved: I am not able to switch from my local branch to ma...
Solved: I wanted to replace folder in my repository with a remote sub module. For this purpose I initially deleted the folder content...
Read more >
git switch - Switching branches | Learn Version Control with Git
Learn how to use the 'git switch' command to check out a different branch and make it your new HEAD branch.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found