From: Patrick Doyle <wpdster@gmail.com>
To: git <git@vger.kernel.org>
Subject: git stash path/to/only/one/subdirectory
Date: Wed, 8 Dec 2010 09:15:51 -0500 [thread overview]
Message-ID: <AANLkTim+sOeVfkAac1v-CsD5GG8Vj2VSjXn-9SSw+Hjb@mail.gmail.com> (raw)
Looking at the man page for git-stash, it seems like I can do this
with the --patch option to git-stash, but I figured I'd ask the
questions anyway...
Is it possible to git-stash a single directory, while leaving the rest
of my working copy in the state it's in?
In my particular case (as of 9:00am this morning), I've realized that
I want to split my work into 2 separate commits; I'm not done with
either of them yet; and they are in completely separate directories
from each other. I would like to do something like:
$ git stash --subdir-only dir1
edit/test stuff in dir2, possibly committing once or twice along the way
$ git commit dir2
go off and do other stuff for a while, and come back to the dir1 stuff
I was playing with
$ git stash pop
finish the dir1 work
$ git commit dir1
If this capability doesn't exist, I could try adding it... would other
folks see this as useful?
--wpd
next reply other threads:[~2010-12-08 14:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-08 14:15 Patrick Doyle [this message]
2010-12-08 15:38 ` git stash path/to/only/one/subdirectory Johan Herland
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=AANLkTim+sOeVfkAac1v-CsD5GG8Vj2VSjXn-9SSw+Hjb@mail.gmail.com \
--to=wpdster@gmail.com \
--cc=git@vger.kernel.org \
/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).