Skip to content
  • SZEDER Gábor's avatar
    stash: introduce 'stash save --keep-index' option · 7bedebca
    SZEDER Gábor authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    '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: default avatarSZEDER Gábor <szeder@ira.uka.de>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    7bedebca