Re: Preserving git history across repositories

[email protected] (Karen Etheridge)
Newsgroups perl.cpan.workers
Message-ID <20131222185831.GR28631@tequila>
On Sun, Dec 22, 2013 at 09:51:23AM -0500, James E Keenan wrote:
> Is it possible to preserve the commit history of a tree of files as
> it moves out of one repository and into another?

This is a bit fiddly but it's quite doable. The steps look something like
this:

- create your new repository, cloned from the 'perl' repository.

- find the files/directories you care about. Delete EVERYTHING else -- not
  just 'git rm -r', but actually wipe out knowledge of those files'
  existence from the history.  One guide to this is here:
  https://help.github.com/articles/remove-sensitive-data  -- and now that
  you know the name of the git commands to use, you should be able to find
  lots of other documents describing variants to this technique.

- now you should be left with just the one tree in the repo, including all
  commits in the history: ext/Pod-Html.  Now you can move it to its new
  location using a normal 'git mv', and continue with development.

(FWIW, I'd suggest doing only minimal changes at this point - rename the
code to live under lib/, add a Makefile.PL, META.* and Changes, and then
immediately releasing to the CPAN, to mark its move out of core -- and then
continue with cleaning up the code in subsequent releases.)

Thanks for taking this on -- it looks like Pod-Html has wanted a caretaker
for quite some time!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.