git - How to add old zipped sources at the beggining of origin trunk? -
when started simple project didn't use repository store changes. created backups simple zip files. have many of them this:
- backup_1_added_feature_a.zip
- backup_2_added_feature_b.zip
- ...
- backup_n_added_feature_z.zip
at point switched git. first commit made last zip sources, , have new commits done:
origin/master: (c1)<-(c2)<-(c3) ...
( c1 == backup_n_added_feature_z.zip )
now add backup zip's in main trunk this:
origin/master: (zip1)<-(zip2)<-(zip3) ... (zipn)<-(c1)<-(c2)<-(c3) ...
is possible in git?
there's manual way it.
git checkout --orphan newroot git rm -rf . # unzip zip1 project directory git add . git commit -m 'zip1' # unzip zip2 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 bash loop, obviously.
see https://stackoverflow.com/a/647451/2578489 explanation.
Comments
Post a Comment