Skip to content

Instantly share code, notes, and snippets.

@p4p4
Last active August 22, 2016 09:38
Show Gist options
  • Save p4p4/1bdcd7772387d2fa992145c277b59ff4 to your computer and use it in GitHub Desktop.
Save p4p4/1bdcd7772387d2fa992145c277b59ff4 to your computer and use it in GitHub Desktop.
Catrobat Catroid migrate to new folder structure

Make migrating to the new folder structure easier

Catroid recently (August 15th) changed the folder structure of the project. This made a lot of open (not yet merged) Pull requests unmergable.

Feel free to use these instructions to migrate to the new folder structure in a fast way. But please only use it if you fully understand what the listed commands really do. Feel free to modify/comment/share. These instructions come without any warranty, which means you operate at your own risk!

Step by step guide.

  • fetch changes from upstream

git fetch upstream develop

  • rebase changes

git rebase upstream/develop

  • [resolve conflicts, if necessary] use git mergetool and then git rebase --continue

  • move files to new folders (list of commands might be incomplete. These were sufficient for my PRs)

git mv catroid/src/org/catrobat/catroid/content/actions/* catroid/src/main/java/org/catrobat/catroid/content/actions/
git mv catroid/src/org/catrobat/catroid/content/bricks/* catroid/src/main/java/org/catrobat/catroid/content/bricks/
git mv catroid/src/org/catrobat/catroid/content/*.java catroid/src/main/java/org/catrobat/catroid/content/
git mv catroid/res/layout/* catroid/src/main/res/layout/

git mv catroidTest/src/org/catrobat/catroid/test/content/actions/* catroid/src/androidTest/java/org/catrobat/catroid/test/content/actions/
  • amend changes usingt the same commit message. Note: this adds your changes to your last commit. Might not be that beautiful if your PR consisted of multiple commits.

git commit --amend --no-edit

  • force push (this can not be undone easily!)

git push --f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment