Last active
December 15, 2015 10:29
-
-
Save Asenar/5246483 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir ~/tmp_working_dir | |
cd ~/tmp_working_dir | |
git init full_smalte | |
cd full_smalte | |
all_subs="installer framework module.sample tests theme.backoffice theme.frontoffice" | |
# part 1 : import all | |
# Six branch doomed to die | |
for i in $all_subs; do | |
git remote add "${i/./-}"_origin https://github.com/Smalte/$i.git | |
done | |
git fetch --all | |
git checkout -b megamerge | |
# part 2 : one branch to govern them all | |
for i in $all_subs; do | |
# get theses datas | |
git merge ${i/./-} | |
# move them to the correct dir (can be improved) | |
mkdir ../${i/./-} | |
mv * ../${i/./-}/ | |
mv ../${i/./-} ./ | |
# this will handle all git add and git rm | |
git add . | |
git commit --m "imported $i" | |
done | |
git commit --allow-empty -m "all submodules imported into main repository" | |
# now removing old references | |
for i in $all_subs; do | |
git remote rm "${i/./-}"_origin | |
done | |
git remote add origin [email protected]:Smalte/Smalte | |
git push origin new_develop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Remarques: