Follow us on X (Twitter)  Like us on Facebook  Connect with us on LinkedIn  Subscribe to our YouTube Channel  Subscribe to our WhatsApp Group

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!




Have a question? Or, a comment? Let's Discuss it below...


Thank you for visiting our website!

We value your engagement and would love to hear your thoughts. Don't forget to leave a comment below to share your feedback, opinions, or questions.

We believe in fostering an interactive and inclusive community, and your comments play a crucial role in creating that environment.