How to add old zipped sources at the beggining of origin trunk?
When I started with my simple project I didn’t use any repository to store changes. I just created a backups with simple ZIP files. I have many of them like this:
At some point I switched to GIT. The first commit I made from my last ZIP sources, and I have already some new commits done:
- Git - Pushing to Remote Repo
- How do I edit a Git commit that is hundreds of merges and merge conflicts into the past?
- Why does git-svn clone set 'master' to a random branch?
- best way to handle many forks (and “sub-forks”) with Github?
- Export git repository with history into another repository
- TF400324: Team Foundation services are not available from server <Server/CollectionName> in Visual Studio 2012
origin/master: (C1)<-(C2)<-(C3) ...
( C1 == backup_N_added_feature_z.zip )
Now I would like to add my backup zip’s in to the main trunk like this:
origin/master: (zip1)<-(zip2)<-(zip3) ... (zipN)<-(C1)<-(C2)<-(C3) ...
Is it possible in GIT?
One Solution collect form web for “How to add old zipped sources at the beggining of origin trunk?”
There’s a manual way to do it.
git checkout --orphan newroot git rm -rf . # unzip zip1 to project directory git add . git commit -m 'zip1' # unzip zip2 to project directory git add . git commit -m 'zip2' ... git rebase --onto newroot --root master git branch -d newroot
You can replace manual unpacking/adding/commiting of zip folder with a bash for loop, obviously.
See https://stackoverflow.com/a/647451/2578489 for explanation.