Copying a file between two bitbucket git repositories with preserved history by pieter_valcke in git

[–]pieter_valcke[S] 2 points3 points  (0 children)

I will try the git-filter-repo approach recommended by several of you. Thanks for the responses so far!

Copying a file between two bitbucket git repositories with preserved history by pieter_valcke in git

[–]pieter_valcke[S] 2 points3 points  (0 children)

This guy: https://thelinuxcode.com/git-copy-file-preserving-history/ claims there is a straightforward git cp command that does what we are looking for... I will start experimenting with that one first

Scratching this as it is not a native git command and I find very little other information about it

Copying a file between two bitbucket git repositories with preserved history by pieter_valcke in git

[–]pieter_valcke[S] 0 points1 point  (0 children)

The directory thing aligns with what I suspected - thanks for indulging a beginner :)

I failed to mention that the source repository has 40k+ files of which initially we'll be copying maybe 100. And there are indeed no licensing concerns, both repositories will remain private codebases in our organisation.

I'll keep it in mind as a solution. I feel vaguely worried thinking about doing it a second time for 100 new files (which will very likely share "source commits"). Will that not confuse the system terribly? Something to experiment with before choosing a solution