Hosting Jamoma modules on Github

So you developed some fabulous modules that you would like to put under Git version control, whether it is to keep history of all changes you made, to have a backup of your files or just because you feel it is fun. Here for the sake of the example, we will look into hosting your sources to Github where all Jamoma source reside. However, following these steps will also gets you to the tracks for hosting your work at other hosting site or on your personnal server.

none set

Create a repository at Github

Once logged in to Github with your personnal account, go to the Dashboard page 1 and click the New Repository button 2.

Now you need to set up the name of your project 1, a short description 2 and optionally a url 3 leading to your site. All these informations will be displayed on your project page. When all fields are completed, click the Create Repository.

none set

When done, Github should get you to your project page. From here, copy your project Git url (i.e @git@github.com:username/yourProject.git@) that you will use to clone the project on your computer.

none set

none set

Put your project under Git control

If you have not yet done so, create a folder on your computer where you want to store your project. Here we create a folder named myUserLib on the Desktop.

none set

none set

Open Terminal.app (which resides in Applications/Utilities/, under OSX), then from the command line, type the following to go to that folder :
cd /path/to/myUserLib (where “/path/to/myUserLib” is the path leading to the folder where you created your project).

none set

If you are not comfortable with the command line, note that under OSX, you can type @cd @ and drag the folder on the Terminal window.

Now you need to set your project folder as a Git local repository. To do so, type :

git init

none set

Switch to the Finder or File Explorer and drag and copy your project files in your Git repository. Here, we copy the folder myFabulousModule and its contained files (Max patch, .html documentation and .xml preset file).

none set

Although we copied our files into the folder, we need to specify Git to add these files under revision control. We do this be running the git add command. The --all option as shown in the illustration below, allows to add all files contained in the UserLib folder.

none set

Now we can store the current content in a new commit, using the command git commit. We will also add a log message using the -m option follow by a message under quotes to describe the changes.

none set

We now need to add a remote for the repository at Github. Run the following command to do so:

git remote add origin git@github:username/yourProject.git

none set

Finally, we can now update the remote repository with the changes:

git push origin HEAD

none set

comments powered by Disqus