Skip to content

Add Existing Project to GitHub

In this tutorial I will show you how you can add your existing project to GitHub. In this tutorial I am using GutHub, but this will work same for any Git hosting provider, like BitBucket, Azure Devops etc.

First you need to create a new repository on GitHub. After you have created that new repository, you will need to copy the path of repository.

After that now on your local system, go to the location where project is and in the root folder of your project, open command line or terminal, and execute this command.

git init

This will create an empty git repository. After that you need to add the remote address in your local git repository, so execute this command in same terminal:

git remote add origin <your-git-repo-url>

This will add that remote repository in your local git repository. Now you can do git fetch to get the latest branches on your local repo or try adding files and perform git push.

Happy coding!

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *