How can I clone a local git repo to github?

I have a few git repos on a local server and I want to synchronise them with Github for remote access.

How do I clone these local repos to Github?

  • git does not show up a newly created branch Gerrit Code Review UI
  • How to install plugin in Rails 3 from local git repository or other local source?
  • fatal: could not read Username for '': No such file or directory
  • In Fish, is it possible to ignore all Git related commands?
  • How do you fetch a remote branch without “checking it out”
  • Can a Git Repository Branch be a sub folder in some other Git Repository?
  • After this, is it just a case of assigning the github repo as a remote of the local server repo?

  • How can I 'git merge' a new file based on a tracked file of a different name?
  • Git always pulls files that I cant edit
  • Git & Deployment: Local changes staged, committed, and pushed, not showing on remote
  • How to only pull latest commit in a git submodule
  • Importing a git project into a subdirectory of a Subversion repository while maintaing history
  • Git log: list all parents commits
  • One Solution collect form web for “How can I clone a local git repo to github?”

    Just create your repo on GitHub, then add GitHub as a remote and push the branches you want to push:

    git remote add github
    git push github master
    Git Baby is a git and github fan, let's start git clone.