author | SZEDER Gábor <szeder@ira.uka.de> | |
Fri, 27 Jun 2008 14:37:15 +0000 (16:37 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 5 Jul 2008 18:22:13 +0000 (11:22 -0700) | ||
commit | 7bedebcaad351108a8f6eab6a031f2be2c06b613 | |
tree | f6faf1fc4dd06fde0c9724188b17798e51e1576e | tree | snapshot |
parent | 6991357513bf8bfbb71a4675e271b386cc273476 | commit | diff |
stash: introduce 'stash save --keep-index' option
'git stash save' saves local modifications to a new stash, and runs 'git
reset --hard' to revert them to a clean index and work tree. When the
'--keep-index' option is specified, after that 'git reset --hard' the
previous contents of the index is restored and the work tree is updated
to match the index. This option is useful if the user wants to commit
only parts of his local modifications, but wants to test those parts
before committing.
Also add support for the completion of the new option, and add an
example use case to the documentation.
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
'git stash save' saves local modifications to a new stash, and runs 'git
reset --hard' to revert them to a clean index and work tree. When the
'--keep-index' option is specified, after that 'git reset --hard' the
previous contents of the index is restored and the work tree is updated
to match the index. This option is useful if the user wants to commit
only parts of his local modifications, but wants to test those parts
before committing.
Also add support for the completion of the new option, and add an
example use case to the documentation.
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-stash.txt | diff | blob | history | |
contrib/completion/git-completion.bash | diff | blob | history | |
git-stash.sh | diff | blob | history |