Git Basics: How to list, create, rename, delete a remote connection?

Continuing the on going series on "Git Basics", we will today learn on "remote connections". I hope, you are enjoying reading this series and read the last post "How to create, move, delete, list Git branches?". Bookmark it for future references.


Today in this post, we will cover how to create, list, rename and delete a remote connection on local Git repository. We will learn all the related commands.


Git Basics - Git Cheatsheet - Git Remote


The "git remote" command lets you create, view and remove connections to other repositories. These remote connections are just like bookmarks/favorite links rather than direct links to the other repositories.


List the remote connections you have to other repositories:

$ git remote


List the remote connections including URLs:

$ git remote -v


Create a new connection to a remote repository:

$ git remote add <name> <url>


Remove the connection to the remote repository:

$ git remote rm <name>


Rename a remote connection:

$ git remote rename <oldname> <newname>


Was this post useful? If you came to this page by searching online about git basics, please have a look into my other blog posts. Subscribe to the RSS feed or the email newsletter to keep yourself updated. If you have any queries, you can either ping me on Twitter or drop a line below in the comments section. Have a great day!


 | Covering latest news, articles, Tips and Tricks on Linux platform

Latest Tech News