Can't switch to another branch after creating new branch
See original GitHub issueDescribe 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
- Have uncommitted new code, then go to Branch.
- Click on New Branch.
- Create branched based on current branch.
- Click on Create branch.
- Click on Bring changes over.
- New branch is created.
- Try to go to a different branch.
- Click on Current branch dropdown.
- Select another branch.
- Click on Leave my changes.
- 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.
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
@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.