News for hackers. Stuff that matters.
Re:Helping a Million Developers Exit Vim by kccqzy on Tuesday May 23, 2017 @02:16PM (#14403707)
How would you undo "git reflog expire"? How would you undo "git push origin -f"?
Re:Helping a Million Developers Exit Vim by hdhzy on Tuesday May 23, 2017 @02:37PM (#14403921)
> How would you undo "git push origin -f"?

Remote reflog contains this info (if enabled).

Of course not all commands would be reversible, especially not plumbing.

Re:Helping a Million Developers Exit Vim by majewsky on Tuesday May 23, 2017 @02:35PM (#14403901)
> git reflog expire

Is there a valid reason to do this in the first place?

> git push origin -f

No standard way to undo that. Only do it if you must, and you absolutely do what's going to happen. Always do a "got remote update" immediately before the force-push and double-check that the remote branch points to what you expect.

As a general rule, "--force" is short for "you better be prepared to deal with the consequences".

Re:Helping a Million Developers Exit Vim by emodendroket on Tuesday May 23, 2017 @04:52PM (#14405214)
Well let me put the question back to you: can changes to git provide undo for literally every command?