Re: Call Me Gitless
- From
Daniel Barkalow <barkalow@iabervon.org>
- Date
- Aug 19, 2008, 21:49 UTC
- Message-ID
- <alpine.LNX.1.00.0808191647320.19665@iabervon.org>
- In-Reply-To
- <20080819203353.GG10544@machine.or.cz>
On Tue, 19 Aug 2008, Petr Baudis wrote:
Show 19 quoted lines
> On Tue, Aug 19, 2008 at 03:42:01PM -0400, Daniel Barkalow wrote: > > On Tue, 19 Aug 2008, Jeff King wrote: > > Ah, okay. I feel like the main application for this is "I typed some git > > diff command, started looking at it, my phone rang, I took the call, and > > now I don't know what I'm looking at, and the pager hides the command > > line, but quitting the pager loses my place." At least, that's the > > situation I'm often in. > > Press ctrl-z. ;-) > > > > > Yeah, that's why I think that format-patch should work on content that you > > > > haven't committed, generating something you can dump right into an email > > > > (with the --- and diffstat that you'd get if you actually did commit and > > > > use format-patch now). > > Hmm, and why don't you actually do the commit after all? You can compose > all the details within the commit and you can do the commit on a > separate branch or git reset HEAD^ afterwards if you don't want to keep > it around.
I personally almost always do something like:
$ git checkout -b informational-diff-prefixes $ git commit -a $ git show HEAD > temp.patch $ git checkout master
But then I tend to use "checkout -b; commit -a; checkout" instead of "reset --hard" to get rid of unwanted local changes anyway these days.
-Daniel *This .sig left intentionally blank*