How to add existing local git repository to remote server
Introduction
This post would demo how to add existing git repository to remote server.
Environments
- Windows/Linux/Mac OS
The script
git remote add introduction
As the git official site says:
Adds a remote named
for the repository at . The command git fetch can then be used to create and update remote-tracking branches / .
git remote -v introduction
-v –verbose Be a little more verbose and show remote url after name. NOTE: This must be placed between remote and subcommand.
Summary
You should init the local git repo, and not forget to push the local master branch to remote server.
You can find detail documents about the git and remote here: