4 ms·
How to undo a change or revert to a previous version? That sounds like a pretty fundamental thing that a user would need to do, yes.
by globular-toast 5y ago
How to undo a change or revert to a previous version? That sounds like a pretty fundamental thing that a user would need to do, yes.
- zibzab 5y agoIt is usually as easy as "git checkout ID". If that doesn't work you probably have done something really bad to begin with.
- ethomson 5y agoThat's probably not what you want. Checking out an ID would put you in a detached HEAD state, and the CLI will give you the page of warning messages that go along with it. I think that this is an excellent reminder that yes, the git CLI is not simple or obvious.