Re: Git automatic stashing?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 9, 2010 at 7:36 AM, Nguyen Thai Ngoc Duy <pclouds@xxxxxxxxx> wrote:
> On Tue, Nov 9, 2010 at 12:37 PM, Casey McGinty <casey.mcginty@xxxxxxxxx> wrote:
>> Is there any feature in git to perform and auto stash apply/pop when
>> trying to do a merge/rebase in a dirty working dir? This would save
>> some keystrokes from time-to-time, and make it easier for new users
>> unfamiliar with git.
>
> And when switching branches too.

When switching branches (or checking out a different commit in general),
I think git allows you to check out as long as the files that need to be
replaced have not been updated, much like when merging. As far as I can
see, that makes the benefit of temporarily stashing changes much smaller
(but not non-existent) in these two cases (checkout and merge) than it
is when rebasing.

Thinking a bit more about it, I think you are right, though, that it
would still be a nice-to-have, as an option. Currently, 'git rebase' is
more restrictive than 'git merge', but adding the option to 'git rebase'
would not just make it on par with 'git merge', but would actually make
it less restrictive than 'git merge', as even non-conflicting changes
within files would be automatically handled.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]