Configure remote
Last updated
Last updated
To be able to collaborate on any Git project, you need to know how to manage your remote repositories. Remote repositories are versions of your project that are hosted on the Internet or network somewhere. Collaborating with others involves managing these remote repositories and pushing and pulling data to and from them when you need to share work.
To see which remote servers you have configured, you can run the git remote
command. It lists the shortnames of each remote handle you’ve specified. If you’ve cloned your repository, you should at least see origin
— that is the default name Git gives to the server you cloned from:
You can also specify -v
, which shows you the URLs that Git has stored for the shortname to be used when reading and writing to that remote, v
stands for verbose:
You do not have an account, create a GitHub account and then from the homepage, create a New
repository as highlighted in the below steps:
Using the commands which git is already showing, let us add and push our existing repository on to GitHub help with the below commands:
The -u
switch makes the remote GitHub repo the default for your existing project ('U' stands for upstream)
To verify that the existing project was pushed to GitHub successfully, log into the GitHub website and browse the repository. All of the files from your existing project should be visible on GitHub’s.
So, refresh the browser and you should see the following: