You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Creating a branch from a commit / detached HEAD has an unexpected recent history #6335
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
Check out a commit in terminal (I did git checkout a813cc1 as an example) and switch to Desktop
In Desktop, create a new branch. Desktop should warn you that the new branch will be based off of the currently checked out commit.
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):
Actual Behavior
The latest commit in the branch is more recent than the one I originally checked out:
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.
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.
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.
Activity
billygriffin commentedon Dec 4, 2018
Thanks @donokuda!
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 commentedon Dec 4, 2018
Oops! I was vague on purpose because I didn't want to assume what was happening. 😅
This is the actual behavior.
I believe that's the latest on master.
tierninho commentedon 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 a813cc1as I already arrived at the Expected result.Is this issue a dupe of this? #6085
donokuda commentedon 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:
Seems like it if the issue is confirmed.
sergiou87 commentedon Sep 19, 2024
Can't reproduce this anymore 🎉