If you have your code which you want to add into github, here are the steps:
1. Create a repository in github with the same outer folder name as your existing directory which you want to add into github.
2. Add a .gitignore file into your outmost folder
You are now basically putting your code into local git control.
4. $git add
Now adding all your source code into local git.
5. $git commit -m “Message”
Committing code into local git
6. $git remote add origin https://github.com/username/repository_name.git
Tell your local git about remote git.
7. $git pull origin master
Sync your local and remotes, this is a merge, you will not loose your code.
8. $git push origin master
Now you code is gone into github, you should be able to see your code in the web interface of git.
After this step you should just follow your git add/git commit and git push.
You got error 403, edit .git/config change https to ssh. This is needed because git supports ssh and not https.
You get Permission denied, please follow instructions at this link. https://help.github.com/articles/set-up-git