-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
warn user when trying to commit with detached HEAD #788
Comments
When I checkout into a detached HEAD state, Git gives me a heads up about where I'm ending up and what I can do:
I'm thinking that it's okay for users to go ahead and make commits without warning them. The moment we should consider warning the user is when they try to switch out of the detached HEAD state (via switching to a branch.) We could let them know that they will potentially lose X number of commits and prompt them to create a branch to save their changes (or discard if they don't.) |
In case the user is in the detached HEAD scenario, we should warn the user in case they try to commit, and help them get back to a safe state.
xref #786 (comment)
The text was updated successfully, but these errors were encountered: