Every repository with this icon (
Every repository with this icon (
Embedding Sproutcore as a Submodule in Your Application
by Evin Grano (etgryphon)
In this tutorial we will be making a simple skeleton application focusing mainly on embedding the latest and greatest of the Sproutcore code as a submodule in your application if you are using git. This is great if you want to add some patches or changes to the Sproutcore base that haven’t made it into the main branch. Let’s get started!
Create the Project:
Let’s construct a simple SproutCore application to show how this could work in practice. First, generate the app:
$ sc-init myApp
Create a fresh git repository
NOTE This is for using a git repository that you are in charge of. Commands will be different if your are using something like Github. This is a rip-off of a pretty good tutorial on creating a new git remote git repository
$ ssh myserver.com Welcome to myserver.com! $ mkdir /var/git/myapp.git && cd /var/git/myapp.git $ git --bare init Initialized empty Git repository in /var/git/myapp.git $ exit Bye!
Now, push your code to the repository
$ cd ~/Workspace/myapp
$ git remote add origin ssh://myserver.com/var/git/myapp.git
$ git push origin master
$ cd ~/Workspace/myapp
$ git remote add origin ssh://myserver.com/var/git/myapp.git
$ git push origin master
Add the Sproutcore Code
This is going to done by using the git-submodule command to make a submodule repository under your
$ git submodule add git://github.com/sproutit/sproutcore.git frameworks/sproutcore
$ git commit -m ‘Created the Sproutcore code as a submodule’
$ git push origin master
To get the code from the repository on another computer
$ git clone ssh://myserver.com/var/git/myapp.git $ cd myapp $ git submodule init $ git submodule update
Conclusion:
The submodule acts like a separate repository so you can do branches and patches to your hearts content.






