Just switch to the root of the git source that you want to push on to github and hit the below command:
git push --mirror https://github.com/GIT-USERNAME/GIT-REPO-NAME.git
For example for my case it is:
git push --mirror https://github.com/yashs360/dril-localrepo.git
Note: you would just have to create the repository on www.github.com before you can start pushing to the repo.