I hope this doesn't come off as me ignoring the bit of frustration you experienced, but I'm going to close this issue out to indicate that this isn't a bug, but a deliberate design decision. Conflicts are scary enough when you expect them to happen having them happen when you least expect it is something I'd like to avoid. I'm a bit wary of giving the option to take changes to another branch since that is likely to result in conflicts and other gotchas. I tried to switch back to master with GitHub Desktop instead of Git Bash, and voila.Īh! I can see how that may be frustrating. I needed to browse a previous state of a repository on my machine, so I ran a git checkout in Git Bash with uncommitted changes sitting on master. This is just a dumb gotcha, I was not making changes to the detached head. On Step 8, I get this cute popup (the branch I tried to switch on Step 6 was master) Step 6 does not switch to the selected branch, it stays on the Detached HEAD. Step 6 should switch to the selected branch Actual Behavior In GitHub Desktop, try to switch from Detached HEAD to any branchĪssuming you cannot switch (which is the case for me every time), here's what I do next to get around it:.In Git Bash (or anything that can run a git command), run git checkout (paste the Commit SHA you copied).On the History tab in GitHub Desktop, right-click any commit and click on Copy SHA.Make some arbitrary change, so that you see at least one file on the Changes tab in GitHub Desktop.In GitHub Desktop, Clone a repository that has some commits.There is a problem when switching from a Detached HEAD to a branch if you have uncommitted changes.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |