Easiest way to rename git project configured on BitBucket
You can also do it in the BitBucket website.
In your project page (https://bitbucket.org/username/yourproject), go to settings, repository details and then change the name and save it.
I think this is the easiest way:
- Rename your project from the bitbucket settings menu
- Clone your newly re-named project
git clone new_url
This works because git is a distributed version control system. As far as git is concerned there is nothing special about the existing repo on your computer. Just clone a new one.
If you prefer to keep using the existing local repo in my opinion it's easier to use git to update itself instead of manually editing a config file:
- Rename your project from the bitbucket settings menu
- Change directory into your local project and update git to fetch data from the newly renamed repo
git remote set-url origin new_url
- Optionally (git doesn't care) rename your local project directory
mv projectname newprojectname
You can rename the project form the settings menu of the projects on Bitbucket.
Once you rename it, you need to update your git config file to fetch the data from the new location
nano .git/config
Change the name of the project to the new name and save