- Create a new repository on GitHub. To avoid errors, do not initialize the new repository with README, license, or gitignore files. You can add these files after your project has been pushed to GitHub.
- Open Terminal.
- Change the current working directory to your local project.
- Initialize the local directory as a Git repository.
- Add the files in your new local repository. This stages them for the first commit.
- Commit the files that you’ve staged in your local repository.
- At the top of your GitHub repository’s Quick Setup page, click to copy the remote repository URL.
- In Terminal, add the URL for the remote repository where your local repository will be pushed.
- Push the changes in your local repository to GitHub.
https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
You can add rock as a submodule of slingshot. In the slingshot repository:
git submodule add https://github.com//rock rock
At this point, you’ll have a rock folder inside slingshot, but if you were to peek inside that folder, depending on your version of Git, you might see … nothing.
Newer versions of Git will do this automatically, but older versions will require you to explicitly tell Git to download the contents of rock:
git submodule update --init --recursive
If everything looks good, you can commit this change and you’ll have a rock folder in the slingshot repository with all the content from the rock repository.