This is a quick explanation of how to get a project you're working on locally, onto a remote hosted Github repository that doesn't exist yet.
This is a simple task, yet I never do it enough to remember exactly the right steps to take. So here's a quick overview.
- Create a new project locally, for example a Sinatra app.
git initin order to initialize your directory
touch README.mdso that Github can display some text, make it useful.
git addall the files you want to include
git commit -m "your commit message"
- Create a repository in your Github account on https://github.com
git remote add origin email@example.com:username/repo-name.gitThis will set your remote repository for you. Use your github username and the repo-name is what you created on the web.
git push -u origin masterwill then get your repository finally pushed to the remote (set as origin). The -u is for credentials into your github repository.