all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kenneth Raeburn <raeburn@raeburn.org>
To: "emacs-devel@gnu.org discussions" <emacs-devel@gnu.org>
Subject: Re: Switching from old git tree
Date: Sat, 15 Nov 2014 03:43:05 -0500	[thread overview]
Message-ID: <EFE60FAA-0C49-47B0-8BE9-7F4447327A49@raeburn.org> (raw)
In-Reply-To: <87egt5q46l.fsf@fencepost.gnu.org>

On Nov 14, 2014, at 08:53, David Kastrup <dak@gnu.org> wrote:

> Sven Axelsson <sven.axelsson@gmail.com> writes:
> 
>> On 14 November 2014 13:20, David Kastrup <dak@gnu.org> wrote:
>>> peder@news.klingenberg.no (Peder O. Klingenberg) writes:
>>> 
>>>> I have been using the old git-mirror for a while.  In there, I have a
>>>> branch with some local modifications.
>>>> 
>>>> I understand that I need to check out a fresh tree now after the
>>>> conversion?  What is the smoothest way of integrating my local branch in
>>>> this new tree?  I'm a very basic git user, and the only way I can think
>>>> of is to extract the patches from my old branch and applying them by
>>>> hand in the new tree.
>>> 
>>> Using git format-patch and git am, rather than git diff and git apply.
>>> 
>>>> Is there something else I should be doing instead?
>>> 
>>> I don't think there is much of an option to do something else.
>> 
>> I suppose you could add your old repo as a local remote to the new one, and
>> cherry-pick your commits, i.e.:
>> 
>> git remote add old /local/path/to/old
>> # Fetch the data to your new repo
>> git fetch old
>> # Find the commits to pick somehow
>> git log old/master
>> # Copy to new repo
>> git cherry-pick <sha-of-commit>
> 
> Well, I was trying to avoid the "double your repository size or no money
> back" effect.  While the file and tree blobs in two differently
> converted Emacs repositories are presumably pretty much the same, the
> entire commit history is disjoint.

I just used this approach for a few of my smaller trees: After creating your "main" clone of the new upstream repository, clone *that* one locally (use the "-s" option to save disk space), then use "git remote add" and cherry-pick as above (or rebase if you prefer), and when finished, push the updated branch(es) back into your main repository, and delete the temporary repository used for the merging process.

More complicated local trees (I've got development branches that forked, and multiple merges from upstream or between branches) are harder; rebase *might* be up to the job, but I suspect I'm going to be experimenting with "git filter-branch" a bit...

Ken




  parent reply	other threads:[~2014-11-15  8:43 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-14 11:26 Switching from old git tree Peder O. Klingenberg
2014-11-14 12:20 ` David Kastrup
2014-11-14 12:35   ` Sven Axelsson
2014-11-14 12:38     ` Sven Axelsson
2014-11-14 13:21     ` Peder O. Klingenberg
2014-11-14 13:53     ` David Kastrup
2014-11-14 14:20       ` Sven Axelsson
2014-11-14 14:54         ` David Kastrup
2014-11-14 15:52         ` Andreas Schwab
2014-11-14 18:29           ` David Caldwell
2014-11-15  8:43       ` Kenneth Raeburn [this message]
2014-11-15  8:58         ` Eli Zaretskii
2014-11-15  9:18           ` David Kastrup
2014-11-15  9:55             ` Eli Zaretskii
2014-11-15 18:26             ` Ken Raeburn
2014-11-14 13:29 ` Nicolas Richard

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=EFE60FAA-0C49-47B0-8BE9-7F4447327A49@raeburn.org \
    --to=raeburn@raeburn.org \
    --cc=emacs-devel@gnu.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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.