[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
stash clear, was Re: git: avoiding merges, rebasing
From: |
Johannes Schindelin |
Subject: |
stash clear, was Re: git: avoiding merges, rebasing |
Date: |
Fri, 19 Oct 2007 15:37:37 +0200 (CEST) |
Hi,
On Tue, 2 Oct 2007, Eric Blake wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> [adding the git list]
>
> According to Bruno Haible on 10/2/2007 5:50 AM:
> > Hello Benoit,
> >
> >>> $ git stash
> >>> $ git pull
> >>> $ git stash apply
> >>> $ git stash clean ; typo!
> >>> $ git stash clear ; fatal correction to typo!
> >>>
> >>> and lost 20 modified files. Well, not really lost. Just took me a
> >>> while to
> >> I don't really see how and why you "lost 20 modified files".
> >
> > I lost modifications to 20 files. "git stash clean" moved these
> > modifications
> > into a stash named "clean", and "git stash clear" killed it.
>
> While we're at it, I wish 'git stash clear' would take an optional
> argument that says which stash(es) to clear, rather than blindly
> clearing the entire stash.
I'd rather avoid "enhancing" stash clear. IMHO it is a little
misdesigned, making it way too easy to hang yourself.
Instead, how about writing a stash pop? "git stash pop [<stash>]". It
would literally just call git stash apply && git reflog delete. Should
not be too difficult, now that I provided "git reflog delete" ;-)
Maybe even deprecating "git stash clear", or doing away with it
altogether.
Ciao,
Dscho
- Re: git: avoiding merges, rebasing, Bruno Haible, 2007/10/01
- Re: git: avoiding merges, rebasing, Benoit SIGOURE, 2007/10/02
- Re: git: avoiding merges, rebasing, Bruno Haible, 2007/10/02
- Re: git: avoiding merges, rebasing, Eric Blake, 2007/10/02
- stash clear, was Re: git: avoiding merges, rebasing,
Johannes Schindelin <=
- Re: stash clear, was Re: git: avoiding merges, rebasing, Miles Bader, 2007/10/23
- Re: git: avoiding merges, rebasing, Benoit SIGOURE, 2007/10/02
- Re: git: avoiding merges, rebasing, Bruno Haible, 2007/10/03
- Re: git: avoiding merges, rebasing, Bruno Haible, 2007/10/03