Moving existing Git repository to Github

July 6, 2017

1 min read

git |

Let’s say you are hosting your private Git repository on your own VPS with a 3rd-party Git-service such as And then you want to make the project public and move it to Github. The question is: how to move existing Git project from a private repository to Github?

First of all, create an empty project (no licenses, no readmes, etc.) on Github.

Now, you should cd to the project’s folder and execute the following: git remote add upstream

Push master branch: git push upstream master - if you have another branches, you probably want to push them too.

Push tags (if you have ones): git push --tags upstream

That’s it. Now your project is on Github.

comments powered by Disqus