Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating a branch from a commit / detached HEAD has an unexpected recent history #6335

Open
donokuda opened this issue Dec 3, 2018 · 4 comments
Labels
investigation-needed Likely bugs, but haven't been reliably reproduced by a reviewer

Comments

@donokuda
Copy link
Contributor

donokuda commented Dec 3, 2018

Description

When I create a branch from a "detached HEAD" state (such as from a commit), the branch is created with a different history (my assumption is that it's master or the default branch)

Version

  • GitHub Desktop: 1.5.0
  • Operating system: macOS 10.13.6

Steps to Reproduce

  1. Check out a commit in terminal (I did git checkout a813cc1 as an example) and switch to Desktop
    image
  2. In Desktop, create a new branch. Desktop should warn you that the new branch will be based off of the currently checked out commit.
    image
  3. After creating a new branch, look at the history.

Expected Behavior

I'd expect the latest commit to be the one that I checked out (I did git reset --hard a813cc1 to simulate this in the UI):
image

Actual Behavior

The latest commit in the branch is more recent than the one I originally checked out:
image

Additional Information

Logs

@billygriffin
Copy link
Contributor

Thanks @donokuda!

In Desktop, create a new branch. Desktop should warn you that the new branch will be based off of the currently checked out commit.

Clarifying question on step 2. Is that the actual behavior or the behavior you think should happen?

On the final "actual behavior," is the commit that was actually the most recent the one that's the latest on master? Just trying to understand specifically what's happening instead of what should happen.

@donokuda
Copy link
Contributor Author

donokuda commented Dec 4, 2018

Oops! I was vague on purpose because I didn't want to assume what was happening. 😅

Clarifying question on step 2. Is that the actual behavior or the behavior you think should happen?

This is the actual behavior.

On the final "actual behavior," is the commit that was actually the most recent the one that's the latest on master? Just trying to understand specifically what's happening instead of what should happen.

I believe that's the latest on master.

@tierninho
Copy link
Contributor

tierninho commented Dec 4, 2018

So I followed the steps and my outcome was the same as your Expected result (ie, branch is 8 days old, and so is last commit). If I switched branches back to master, the latest commits were shown.

I did not use git reset --hard a813cc1 as I already arrived at the Expected result.

Is this issue a dupe of this? #6085

@billygriffin billygriffin added the more-info-needed The submitter needs to provide more information about the issue label Dec 6, 2018
@donokuda
Copy link
Contributor Author

donokuda commented Dec 12, 2018

I just realized that I didn't include the initial history in the first screenshot, which probably doesn't help troubleshooting.

Here's a gif reproducing the issue that I'm running into:

kapture 2018-12-12 at 13 29 36

Is this issue a dupe of this? #6085

Seems like it if the issue is confirmed.

@shiftkey shiftkey added investigation-needed Likely bugs, but haven't been reliably reproduced by a reviewer and removed more-info-needed The submitter needs to provide more information about the issue labels Dec 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigation-needed Likely bugs, but haven't been reliably reproduced by a reviewer
Projects
None yet
Development

No branches or pull requests

4 participants