Re: Git reset -p on working tree
- From
Jeenu V <jeenuv@gmail.com>
- Date
- Nov 23, 2010, 10:26 UTC
- Message-ID
- <AANLkTimQ644C-dEoJTj8bNd9y+YzpMez7D1KLZFNEe7c@mail.gmail.com>
- In-Reply-To
- <AANLkTimP9zr=wQDYeBxtvYCE1mZ1aHXQ_nLOxGFfR9YD@mail.gmail.com>
On Tue, Nov 23, 2010 at 2:50 PM, knittl <knittl89@googlemail.com> wrote:
Show 14 quoted lines
> On Tue, Nov 23, 2010 at 10:11 AM, Jeenu V <jeenuv@gmail.com> wrote:
>> Often I find it useful to selectively undo the modifications that I
>> did to my working tree. The -p option to 'reset' that selectively
>> resets changes back to a given commit. Unfortunately the option
>> reports itself to be incompatible with --{hard,soft,mixed} and thus
>> can't be applied to working tree.
>>
>> Right now I do this with vimdiff, by applying 'git diff' in reverse.
>> Wish reset supports -p on working tree operations as well because the
>> -p framework (of add, and reset) feels good to use.
>
>
> there's `git checkout -p` to selectively remove changes from your working tree.
> (also `git stash -p` to selectively stash changes temporarily)Surprised to know that checkout and stash supports it! Thanks a lot for pointing out.
-- Jeenu