Configure remote
Configure remote repository
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.
Showing Your Remotes
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:
git remote
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:
git remote -v
Create a repository on GitHub
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:




Push to GitHub repo
Using the commands which git is already showing, let us add and push our existing repository on to GitHub help with the below commands:
Add reference to our repository
git remote add origin https://github.com/ravirammysore/MyFirstRepo.git
Push to GitHub
The -u
switch makes the remote GitHub repo the default for your existing project ('U' stands for upstream)
git push -u origin master
Enumerating objects: 12, done.
Counting objects: 100% (12/12), done.
Delta compression using up to 8 threads
Compressing objects: 100% (7/7), done.
Writing objects: 100% (12/12), 1024 bytes | 1024.00 KiB/s, done.
Total 12 (delta 0), reused 0 (delta 0)
To https://github.com/ravirammysore/MyFirstRepo.git
* [new branch] master -> master
Branch 'master' set up to track remote branch 'master' from 'origin'.
git status
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean
Verify the GitHub Push
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:


Last updated