Git – How to connect a local repository with a remote server

In this post, we will see how to connect a local repository to a remote server, like GitHub, Bitbucket and Microsoft DevOps.

First of all, we have to choose one of them and then we create a repository.
After that, we open Git Bash, go into directory where we have created the local repository and we run the commands:
git remote add origin “url remote repository”
git push -u origin –all

The link between local and remote repository has been created.