At work we moved from SVN to BitBucket a few weeks back. At the beginning, some colleagues started to split code from what used to be the main single SVN trunk into repositories by just moving the files around without taking care of the commit history. Now, I am doing this properly by following the procedure outlined in link #2 below.
For those cases which were done in the past, I would like to dig the history for those folders from the original repository where the main SVN trunk ended up and apply it to the repositories where the code was moved to. Is there an easy way to do it? Bear in mind we're quite new to GIT and BitBucket so solutions that may appear obvious to you will not be so straightforward to us...
I am thinking about generating patches from the old repository and applying them in the new one but since the folders are not there anymore, should I go back to the commit where the folders were deleted? If so, how?
Thanks a lot in advance!
For clarification, what happened is (no branching at all!):
- Clone Repo A.
- Create Repo B and clone.
- Move folder XYZ between the local folders.
- Commit deletion of files on Repo A.
- Add files in Repo B.
- Commit addition of files on Repo B.
- Push both repos to master on remote.
Note: I have already checked the following two threads and they do not do exactly what I want. In fact, I have used the second one to move folders into independent repositories successfully afterwards.
Link #1 - Git: Copy history of file from one repository to another
Link #2 - How to move files from one git repo to another (not a clone), preserving history