I am trying to move files from one local git repository to another local git repository for a different project while preserving history fr
I've made some progress, but it's much more manual now.
log
with and without --follow
to see which files have been renamed/moved/copied (calling them all "renamed" for simplicity).log
output.format-patch
but give all the old names as well as the current name on the command line.So now I have something like this:
git format-patch -B -M -o /tmp/patches --root -- old_dir_name/dir1/dir2/filename new_dir_name/dir0/dir1/dir2/filename
which creates the patches to create the old file, rename it to the new name, and then continue patching the file. Of course the problem there for me is that the old directory doesn't exit in the new repo and the directory level has changed, so there is still some mucking about to do with getting the directory names to work.
This should be easier....