I have here a rather special case: I have some old repositories in different VCSs (git,svn). I now want/have to tidy up things a bit.
The goal was to migrate everything to one single VCS and we decided on git.
In a first step I imported the "foreign" VCS history into git using git svn
. Everything ok so far.
Another issue was that the users did not use SVN correctly in the sense that all files (including the generated/compiled ones) were added to the VCS. As a result the history is quite large and cumbersome. As new projects will soon start from the actual version I search for a solution to avoid the whole binary data to be kept within every development repo in git. On the oter hand I do not want to throw everything old away. It might be needed in future. as there are severar branches,...
I found the information that the linux kernel used a spliting of the history too (see this question on stackoverflow). I played a bit around with the linux kernel repos to see how things work out there.
Now I am unsure if I understood everything correctly and if I am doing it the right way. Normally I would create an orphaned branch from the working copy and use this one as the starting point of any future development:
git checkout --orphan new_master
<Commit all source files and leave all bin files out>
git remote add new_origin <...>
git push new_origin new_master:master
In case the old history is needed I need to clone the newly created repository as well as the "historical" one. The I have two independent working lines in git which are logically linked.I then add a graft for the initial commit of the new repo to the final commit of the historical repo and should be set up with a complete repo.
Am I correct or is there a better way?