git filter branch - how to rename/unite directories by git for all commits -
let exist git repo following directory structure (it converted svn):
/ release 1 sub_dir1 somefiles1 sub-dir2 somefiles2 release 2 sub_dir1 somefiles1 sub-dir2 somefiles2 release 3 sub_dir1 somefiles1 sub-dir2 somefiles2 ...
annotation history of svn repo:
every year cleaver body took latest release , copyed new release next number @ same repo. sub-dir/files structure releases same. every release has different history periods.
for each commit (hole repo) how to: 1 rename releasex roots 1 directory named "release"? 2 keep/unite commit history files of releases?
result repo must looks like:
/ release sub_dir1 somefiles1 sub-dir2 somefiles2
alternatively can reconvert each releasex svn separate repox. each repox need rename releasex release. need unite repos... ugrhh. think it's rakerway
the current approach seems on complicated.
something chew on:
have considered creating separate branches each release, versus creating new directory every time? quick git checkout release-1
take release 1 source -- similar cd release-1/
--o---o---o---o---o---o---o---o---o---o---o---o---o---o-master/latest release | | | \--release-1 \--release-2 \--release-3
this allows git merge
branch(es) you'd like. approach may cut down repo size (bonus!), performance reasons.
possible inspiration: http://nvie.com/posts/a-successful-git-branching-model/
this allows easier patching. can make fix on release-1, , generate patches other releases quite easily.
Comments
Post a Comment