I couldn't find anything even remotely related in the documentation.
To rename your bitbucket repo you can do 2 simple actions: Rename your repository name in bitbucket repository settings(Your repository>Settings>Name field)
Select the repo you want to rename under Git repositories on the left and select .... Select Rename repository... from the menu. If the Repositories pane is not expanded, select > to expand it and display the list of repositories. Enter a new repo name in the Repository name field in the dialog, then select Rename.
Just in case the attached screenshot is not accessible, follow these steps - Open new tab in source. In the "New Tab", one should see the list of existing repos/tabs. Right click on a tab, and one should see a Rename option.
Using the Bitbucket website you can rename a repo as follows:
https://bitbucket.org/username/oldname/overview
'r'
then 'a'
for administration. Name
field.Save repository details.
Be advised that changing the name of the repo will change its URL access too. Previously the access was https://[email protected]/username/oldname.git
Now, however, the repo's URL/Path will be https://[email protected]/username/newname.git
You can check this by going back to the Overview page, and hovering over the big blue HTTPS button. The bottom of your browser will show that it now points to https://[email protected]/username/newname.git
If you are using SourceTree you can update the remote's URL by highlighting the local repo in SourceTree and then
Repository
Repository Settings...
origin https://[email protected]/username/oldname.git
Edit
URL/Path
field. Change 'oldname.git' to 'newname.git', leave the rest unchanged. So the full path should be https://[email protected]/username/newname.git
OK
According to https://developer.atlassian.com/cloud/bitbucket/rest/api-group-repositories/#api-repositories-workspace-repo-slug-put
PUT https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug} --data "{\"name\": \"${new_name}\"}"
Using the PUT method allows renaming of a repository.
According to https://confluence.atlassian.com/display/BITBUCKET/repository+Resource+1.0:
PUT https://api.bitbucket.org/1.0/repositories/{accountname}/{repo_slug} --data "name=new name"
This allows to update the visible name of a repository.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With