From: Andreas Ericsson <ae@op5.se>
To: Anders Melchiorsen <mail@cup.kalibalik.dk>
Cc: Brandon Casey <casey@nrlssc.navy.mil>,
David Kastrup <dak@gnu.org>,
git@vger.kernel.org
Subject: Re: Usability of git stash
Date: Mon, 20 Oct 2008 11:49:35 +0200 [thread overview]
Message-ID: <48FC542F.9010200@op5.se> (raw)
In-Reply-To: <87prly5k5r.fsf@cup.kalibalik.dk>
Anders Melchiorsen wrote:
> Brandon Casey <casey@nrlssc.navy.mil> writes:
>
>> In exchange for allowing new users to stub their toe on new commands, the
>> work flow of more experienced users is made a little easier.
>
> I wonder whether experienced users even use stash a lot. Personally,
> after getting my head around the DAG, and thus getting more
> comfortable with git reset, I tend to make "WIP" commits instead.
>
I use stash quite a lot. It's useful for me because my co-workers
sometimes pull from me so I cannot use 'wip' commits (without annoying
my co-workers anyway).
> After having used "git stash clear" at a bad time once, I am wary of
> stashing work that I actually want to keep. I prefer workflows where
> my mistakes can be (easily) corrected.
>
I never use "stash clear", but always do "stash pop", so my stash-stack
is hardly ever deeper than one. It would be a lot worse for us to get a
"wip" commit accidentally propagated and built on further. It's happened
and it's no fun what so ever as it requires team coordination and rewrite
of published history to get it back to a good state.
>
> The primary thing that stash does for me is preserve the index state.
> Unfortunately, --index is not default for stash apply, so I often
> forget it.
>
I commit regularly enough that it doesn't take me long at all to re-do
the index changes.
> Sometimes, I also want stash to store away changes to untracked files
> (to get a clean working directory), but that is not possible.
>
git add .
git stash --index
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
next prev parent reply other threads:[~2008-10-20 9:50 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-15 19:24 Usability of git stash Anders Melchiorsen
2008-10-15 19:31 ` Brandon Casey
2008-10-16 11:24 ` David Kastrup
2008-10-16 15:22 ` Brandon Casey
2008-10-18 9:26 ` Anders Melchiorsen
2008-10-19 18:40 ` Shawn O. Pearce
2008-10-19 21:08 ` Leo Razoumov
2008-10-19 21:49 ` Shawn O. Pearce
2008-10-19 23:12 ` Stephan Beyer
2008-10-20 9:36 ` Miles Bader
2008-10-20 0:36 ` Jeff King
2008-10-20 5:29 ` Junio C Hamano
2008-10-20 5:23 ` Miles Bader
2008-10-20 9:49 ` Andreas Ericsson [this message]
2008-10-20 16:33 ` Brandon Casey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48FC542F.9010200@op5.se \
--to=ae@op5.se \
--cc=casey@nrlssc.navy.mil \
--cc=dak@gnu.org \
--cc=git@vger.kernel.org \
--cc=mail@cup.kalibalik.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).