From: Patrick Doyle <wpdster@gmail.com>
To: git <git@vger.kernel.org>
Subject: Howto request: going home in the middle of something? v2009
Date: Tue, 21 Apr 2009 09:39:53 -0400 [thread overview]
Message-ID: <e2a1d0aa0904210639t2ca73364pff26c85a0224182e@mail.gmail.com> (raw)
Hello,
I've developed a work habit of keeping my source code repository on a
USB stick and carrying that back and forth with me between work and
home. (I typically have small, branchless, single-developer
projects.) When I arrive at the other machine, I do
$ git pull
(code, commit, code, commit, etc...)
$ git push
Occasionally at the end of the day (if I'm at work) or at the end of
the night (if I'm at home), I'm in the middle of something that I want
to continue, and I end up making a "work-in-progress" commit
$ git commit -a "WIP"
just so I can pull that in the next day/evening and continue where I
left off. But that leaves a bunch of "WIP" commits in my history. I
started looking around for a better way to do this, and came across a
2007 discussion (at
http://kerneltrap.org/index.php?q=mailarchive/git/2007/10/18/347020/thread)
where the OP really wanted (as do I) do be able to do something like
this:
$ git stash
$ git push
$ git stash-push
(travel to other site)
$ git pull
$ git stash-pull
$ git stash apply
(continue coding and committing as before)
There were a number of different suggestions, such as:
$ git commit -b temp -a -m "Hold for transport home"
Then when I get home I do this:
$ git fetch work
$ git merge work/temp
$ git reset HEAD^
# code code code
$ git commit -b temp -a -m "Hold for transport to work"
When I'm finished at home and want to carry on at work:
$ git fetch --force home
$ git merge home/temp
$ git reset HEAD^
# start coding for the day
... or using git-bundle
That discussion dates back to 2007. Is there a new, improved, 2009
way of accomplishing this?
--wpd
next reply other threads:[~2009-04-21 13:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-21 13:39 Patrick Doyle [this message]
2009-04-21 13:43 ` Howto request: going home in the middle of something? v2009 Mikael Magnusson
2009-04-21 13:47 ` Michael Witten
2009-04-21 17:05 ` Daniel Barkalow
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=e2a1d0aa0904210639t2ca73364pff26c85a0224182e@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