How do I rename an existing Git remote?

To change the name of an existing remote you’ll need to use the git remote rename command.

In order to change the name of your remote you will need two things.
1. The current name of your remote.
2. The name you want to change your remote to.
For example:
Let’s say that your current remote name is “beanstalk”. And now you want to change the remote name to  “origin”.
1.  Confirm the name of your current remote by running this command:
git remote -v
 You should see an output like this. In this example, the remote name for the repo is “beanstalk”. 
2. Now that the current remote name is confirmed — you can change it by running this command:
git remote rename beanstalk origin
This command tells git to rename the current remote to something different. In this example, we’re changing the remote name to “origin”, but you can change your remote to be anything you want.
3.  Verify that your remote has changed from “beanstalk” to “origin” by running the git remote -v command again.

Still need help? Contact Us Contact Us