5

I am currently creating a mobile app and I use Phonegap to deploy it to different platforms. We currently have created the app for the Android Platform and the iOS Platform. The Android one has a git repository, the iOS one does not (yet). Both app versions have a www folder which are extremely similar (only the phonegap.js and plugin files differ). I wish to create a secondary GIT repository for iOS which shares the www folder from the original repository (Android), so I don't have to copy-paste the files every time.

Is this possible?

Rex
  • 610
  • 9
  • 19
  • 4
    You could use put the shared folder in a separate repository and include it as a [git submodule](http://git-scm.com/book/en/Git-Tools-Submodules) in both your Android and iOS repos. – Alex Wilson Jul 13 '12 at 15:10
  • Came in here to say that. You should post it as an answer. – pdesantis Jul 13 '12 at 15:50
  • possible duplicate of [How to share files across git repositories?](http://stackoverflow.com/q/1540879/), [Share code between rails projects](http://stackoverflow.com/q/6004681/) – outis Jul 14 '12 at 21:51

1 Answers1

5

Other than git submodule, you can also try git-subtree. You can also check Sharing code between projects with git subtree

Lin Jen-Shin
  • 172
  • 8