Skip to content

Instantly share code, notes, and snippets.

@lolautruche
Last active August 29, 2015 14:04
Show Gist options
  • Save lolautruche/b8802b5ad1ef3a966d62 to your computer and use it in GitHub Desktop.
Save lolautruche/b8802b5ad1ef3a966d62 to your computer and use it in GitHub Desktop.
Oro DistributionBundle split

Subtree split of OroCRM/DistributionBundle

  1. Clone the base repository into oro-platform directory:

    git clone git@github.com:lolautruche/platform.git oro-platform
    git remote add upstream git@github.com:orocrm/platform.git
    git config branch.master.remote upstream
  2. Run the 2 shell scripts, split_oro_config_component.sh and split_oro_distribution_bundle.sh

  3. The base clone must be updated on a regular basis via CRON:

    git fetch upstream
    git rebase upstream/master

    And of course, the shell scripts must be run after rebase.

#!/bin/bash
# oro-platform is a regular clone of git@github.com:lolautruche/platform.git
cp -rp oro-platform oro-config
cd oro-config
git filter-branch -f --tag-name-filter cat --prune-empty --subdirectory-filter src/Oro/Component/Config -- --all
git push --force --tags git@github.com:lolautruche/OroConfigComponent.git master
cd ..
rm -rf oro-config
#!/bin/bash
# oro-platform is a regular clone of git@github.com:lolautruche/platform.git
cp -rp oro-platform oro-distribution-bundle
cd oro-distribution-bundle
git filter-branch -f --tag-name-filter cat --prune-empty --subdirectory-filter src/Oro/Bundle/DistributionBundle -- --all
git push --force --tags git@github.com:lolautruche/OroDistributionBundle.git master
cd ..
rm -rf oro-distribution-bundle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment