Skip to content

ensure creating branch with detached HEAD does not revert to default branch - #6104

Merged
shiftkey merged 4 commits into
masterfrom
detached-head-branch
Nov 23, 2018
Merged

shiftkey merged 4 commits into
masterfrom
detached-head-branch

Conversation

@shiftkey

@shiftkey shiftkey commented Nov 5, 2018 •

Copy link
Copy Markdown
Member

Overview

🌵🌵🌵🌵 Builds upon #6100, go review that first 🌵🌵🌵🌵

Closes #6085

Description

This PR does a few things around the original bug:

  • extract function from inside component - 6fc99d6
  • wrap it in tests to catch regressions - a599356
  • make the tests fail so that we can see the bug - 87ec4b1
  • finally, fix the bug by respecting when the repository is in detached HEAD - e463cd4

TODO

Release notes

Notes: Creating a branch when in detached HEAD state no longer reverts to using the default branch

@shiftkey shiftkey added the ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Nov 5, 2018
@shiftkey shiftkey added this to the 1.5.1 milestone Nov 6, 2018
@shiftkey shiftkey mentioned this pull request Nov 13, 2018
1 task done
@shiftkey
shiftkey force-pushed the detached-head-branch branch from 721706c to e463cd4 Compare November 15, 2018 16:23
@shiftkey

Copy link
Copy Markdown
Member Author

Rebased and ready for proper review now 🎉

Comment thread app/src/lib/create-branch.ts Resolved
@iAmWillShepherd iAmWillShepherd self-assigned this Nov 21, 2018
@shiftkey
shiftkey merged commit a916986 into master Nov 23, 2018
@bangke213

This comment was marked as spam.

@bangke213

This comment was marked as spam.

@shiftkey
shiftkey deleted the detached-head-branch branch November 23, 2018 12:44
@kaster14

kaster14 commented Mar 12, 2024 •

Copy link
Copy Markdown

This functionality is broken again, I am having the same problem as in this issue and #6085
In my use case I have a dev branch I merge downstream to other branches which have additional commits that don't exist on dev.

From GH desktop on my feature branch if I right on a commit and select "Checkout commit" it takes me to that commit on Dev branch and not on my feature branch so my additional commits on my feature branch disappear from the commit history.

I did have one instance where this process worked correctly and used my feature branch (which made me look crazy to my coworkers when I was reviewing this with them! :-D ), but then when I did it a second time it reverted to the dev branch history and I was exonerated. I do not know how to repeat that intermittent functionality.

I'm running windows 10 Pro
image

@shiftkey

Copy link
Copy Markdown
Member Author

@kaster14 I would advise opening a fresh issue and filling out the template

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

Labels

ready-for-review Pull Requests that are ready to be reviewed by the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants