Reputation: 5477
I have a rails app called appname
and a remote repo at bitbucket with the same name. I would like to rename it to another_name
.
So far, I've tried changing the remote repo's name to another_name
, tried git push
and it fails. I didn't try renaming the rails app & its folder though, being afraid that something might break.
What's the right step to do this?
Upvotes: 0
Views: 884
Reputation: 5477
Thanks to Agis' answer, this is how I did it:
another_name
.git remote set-url origin [email protected]:myname/another_name.git
(I'm using SSH instead of HTTPS)another_name
using Windows explorer.find all
feature to find all the files that contain the old name & replace the old name with the new one.Upvotes: 0
Reputation: 33646
If you rename your remote repository, you also have to update the remote's URL in your local git repo:
git remote set-url origin https://new-url-here
You can rename the local folder freely without any side-effects.
Upvotes: 2