Splitting Git Repository

The OpenSeizureDetector git repository has become quite big, and contains several different applications.  This means it is difficult to use the GitHub issue tracking tools and commit logs to see what is happening with different apps.

So, I have split it by doing the following:

  1. Created an OpenSeizureDetector organisation on github.
  2. Transferred ownership of the OpenSeizureDetector repository to the new organisation.
  3. Checked out the repository to ~/OpenSeizureDetector, and created a new directory ~/OpenSeizureDetector_split then:
    1. Create a copy of the whole OpenSeizureDetector Repository
      cd ~/OpenSeizureDetector_split
      git clone ../OpenSeizureDetector
    2. Filter it down to just the required folder
      git filter-branch --prune-empty --subdirectory-filter pebble_version/Android_SD_Client_AS/ master
    3. Create a new repository under the OpenSeizureDetector organisation in Github (using the github web interface) (called for example Android_SD_Client.git)
    4. Copy our new trimmed down repository to a sensible folder name:
      cd ~/OpenSeizureDetector_Split
      git clone OpenSeizureDetector Android_SD_Client
    5. Point the new copy to the new github repository:
      cd Android_SD_Client
      git remote set-url origin https://github.com/OpenSeizureDetector/Android_SD_Client.git
    6. And finally push it up to github with
      git push