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!

 

 

 


If you have come this far, it means that you liked what you are reading. Why not reach little more and connect with me directly on Twitter, Facebook, Google+ and LinkedIn. I would love to hear your thoughts and opinions on my articles directly. Also, don't forget to share your views and/or feedback in the comment section below.

2 comments

  1. Hi Kunal.
    I am working on Git for past some day. One of may friends suggested your blog. Thanks for sharing these important points.

    ReplyDelete
    Replies
    1. Glad to hear that. Stay tuned for more posts on this series.

      Delete

 
© 2008-2016 Kunal-Chowdhury.com - Microsoft Technology Blog for developers and consumers | Designed by Kunal Chowdhury
Back to top