All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: David Aguilar <davvid@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
	Patrick Doyle <wpdster@gmail.com>, git <git@vger.kernel.org>
Subject: Re: Move git-stash from one machine (or working copy) to another
Date: Sun, 23 Jan 2011 10:04:53 +0100	[thread overview]
Message-ID: <vpqaaisj8i2.fsf@bauges.imag.fr> (raw)
In-Reply-To: <1E3784B5-76A2-4071-989D-46E271BB1BAC@gmail.com> (David Aguilar's message of "Sat\, 22 Jan 2011 18\:05\:20 -0800")

David Aguilar <davvid@gmail.com> writes:

> This won't handle all cases, but it should do the trick 80%+ of the
> time.
>
> % git diff > foo.patch

Or, if the patch produced by "git diff" doesn't do it:

git commit -am foo
git format-patch -1
git reset HEAD^

> (on other machine)
> % git apply foo.patch

In one command:

git diff | ssh other-machine 'cd /path/to/repo && git apply'

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

  reply	other threads:[~2011-01-23  9:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-21 14:54 Move git-stash from one machine (or working copy) to another Patrick Doyle
2011-01-21 17:49 ` Junio C Hamano
2011-01-23  2:05   ` David Aguilar
2011-01-23  9:04     ` Matthieu Moy [this message]
2011-01-23 10:08 ` Andreas Schwab

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=vpqaaisj8i2.fsf@bauges.imag.fr \
    --to=matthieu.moy@grenoble-inp.fr \
    --cc=davvid@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=wpdster@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.