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

Undoing a keep reset the same as undoing a hard reset #296

Open
etomzak opened this issue Jun 12, 2020 · 3 comments
Open

Undoing a keep reset the same as undoing a hard reset #296

etomzak opened this issue Jun 12, 2020 · 3 comments

Comments

@etomzak
Copy link

etomzak commented Jun 12, 2020

Best I can tell, "I accidentally did a --keep reset, and I want my changes back" has the same answer as the existing I accidentally did a hard reset, and I want my changes back. I could be missing some minor git details, though.

If the answer is the same, I'm happy to make a PR to extend the existing wording.

@RichardLitt
Copy link
Collaborator

Where is the answer to "I accidentally did a --keep reset, and I want my changes back"? I don't see it in the doc.

@etomzak
Copy link
Author

etomzak commented Jun 15, 2020

That's what I mean: "I accidentally did a --keep reset, and I want my changes back" is not in the doc, but it would be helpful to have it in the doc. If it were in the doc, then I'm pretty sure the answer would be the same as the answer to "I accidentally did a hard reset, and I want my changes back" (which is already in the doc).

One option would be to extend the wording of the existing "hard" question to also include "keep". Another option would be to add a separate "keep" question, which would have an identical answer as the "hard" question.

That said, I don't have much experience digging through the reflog, so I'm not 100% certain that the answer to "keep" is the same as the answer to "hard". There could be some arcane reason why undoing a reset --keep needs to be subtly different from undoing a reset --hard.

@RichardLitt
Copy link
Collaborator

I would just add a line to the section saying that "this also works if you accidentally ...". That should make it serchable.

There could be some arcane reason why undoing a reset --keep needs to be subtly different from undoing a reset --hard.

Sounds like this would be a fun thing to find out! Would you like to look into it, and submit the changes in a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants