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

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:47

Johannes Schindelin [off-list ref] writes:
In the same way, I would expect "git revert <commit> -- file" to undo the 
changes in that commit to _that_ file (something like "git merge-file 
file <commit>:file <commit>^:file"), but this time commit it, since it 
was committed at one stage.
Allowing people to revert or cherry pick partially by using
paths limiter is a very good idea; the whole "it comes from a
commit so we also commit" feels an utter nonsense, though.

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

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:43:47

Hi,

On Mon, 5 Nov 2007, Junio C Hamano wrote:
Johannes Schindelin [off-list ref] writes:
quoted
In the same way, I would expect "git revert <commit> -- file" to undo 
the changes in that commit to _that_ file (something like "git 
merge-file file <commit>:file <commit>^:file"), but this time commit 
it, since it was committed at one stage.
Allowing people to revert or cherry pick partially by using paths 
limiter is a very good idea; the whole "it comes from a commit so we 
also commit" feels an utter nonsense, though.
No.

When "git revert <commit>" commits the result, "git revert <commit> -- 
<file>" should, too.

You can always add the "-n" option.

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