author | Thomas Rast <trast@student.ethz.ch> | |
Sat, 15 Aug 2009 11:48:31 +0000 (13:48 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 15 Aug 2009 22:17:47 +0000 (15:17 -0700) | ||
commit | d002ef4d9446b9fe4d0c397131edce58781df2f1 | |
tree | 50edd9828af40f2786937af4cd72b83c63b6ef14 | tree | snapshot |
parent | 46b5139cae7306194a39fdaf5c6abc12ab531c84 | commit | diff |
Implement 'git reset --patch'
This introduces a --patch mode for git-reset. The basic case is
git reset --patch -- [files...]
which acts as the opposite of 'git add --patch -- [files...]': it
offers hunks for *un*staging. Advanced usage is
git reset --patch <revision> -- [files...]
which offers hunks from the diff between the index and <revision> for
forward application to the index. (That is, the basic case is just
<revision> = HEAD.)
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This introduces a --patch mode for git-reset. The basic case is
git reset --patch -- [files...]
which acts as the opposite of 'git add --patch -- [files...]': it
offers hunks for *un*staging. Advanced usage is
git reset --patch <revision> -- [files...]
which offers hunks from the diff between the index and <revision> for
forward application to the index. (That is, the basic case is just
<revision> = HEAD.)
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-reset.txt | diff | blob | history | |
builtin-reset.c | diff | blob | history | |
git-add--interactive.perl | diff | blob | history | |
t/t7105-reset-patch.sh | [new file with mode: 0755] | blob |