[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git
Subject:    Re: Git branches - confusing behavior
From:       "Patrick Aljord" <patcito () gmail ! com>
Date:       2008-05-11 15:25:04
Message-ID: 6b6419750805110825t51730d16y211d2c502a1b302d () mail ! gmail ! com
[Download RAW message or body]

On Sun, May 11, 2008 at 8:39 AM, Dima Kagan <dima.kagan@gmail.com> wrote:
> My proposed change shouldn't necessarily break the described workflow. Git can keep \
> the current behavior for new branches, but automatically 'stash' the changes when \
> checking-out an existing branch. At least having an optional parameter for \
> "auto-stashing" will be nice. 
> What do you think of that?

you can do just that with an alias, in .git/config add:

[alias]
        auto-stash = !git stash && git checkout $1

then type "git auto-stash master" or "git auto-stash some_branch" and
it should stash and checkout the branch.

Cheers,

Pat
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic