First we will create a plain Ruby on Rails application:
rails test_app cd test_app/ ./script/generate plugin test-plugin
The next step is to create a git repository on your local machine:
cd vendor/plugins/test-plugin git init #initialize the git repository git add . #add all the files to the repository git commit -m "import" # commit the files and add a message to them
Now we have to configure the remote github repository:
git remote add github git@github.com:username/test-plugin.git
And the last step is to push the changes to your github repository and your code is online!
git push github master