Thread (14 messages) flat view 14 messages, 7 authors, 2016-06-15

Re: [PATCH] git-revert is one of the most misunderstood command in git, help users out.

From: Robin Rosenberg <hidden>
Date: 2016-06-15 22:43:48

onsdag 07 november 2007 skrev Johannes Schindelin:
Hi,

On Wed, 7 Nov 2007, Mike Hommey wrote:
quoted
On Tue, Nov 06, 2007 at 10:25:48PM +0000, Johannes Schindelin [off-list ref] wrote:
quoted
On Tue, 6 Nov 2007, Robin Rosenberg wrote:
quoted
tisdag 06 november 2007 skrev Mike Hommey:
quoted
Maybe the documentation could emphasise on how to undo things when 
the user makes mistakes. Sometimes, saving your repo can be as 
simple as git reset --hard HEAD@{1}. This is not, unfortunately, a 
works-for-all-cases command.
Yea, git-undo(7). 
In related news, I know a few users who need an un-rm-rf.  Anyone?
The fact is you can do harm to your repo with things you wouldn't expect 
to break things, except maybe you gave bad arguments or so. It's quite 
easy to fuck up with git-rebase, or to merge the wrong commits, etc.
I don't see how these commands are dangerous.  Usually you just look into 
the reflog, pick the one commit you started with, and reset --hard.
Indeed, but you must *know* that and you must know that you *can* do it.

As for undo rm -rf, it's not part of git and outside the scope of git.

-- robin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help