Reputation: 13120
I have a project hosted on BitBucket
Can I rename it ?
If not and I need to create a new repository can someone tell me the easiest way to do that and have new repo on BitBucket (one particular cause of confusion for me is whether to drive the process locally or from the bitbucket website)
Update
Thankyou Rafal I've followed your instructions and it works great but Im just going to make it a little clearer for noobies like myself (on linux)
Upvotes: 91
Views: 70151
Reputation: 390
Want to toss this out on this thread since I'm not seeing it, but Bitbucket will keep track of previous names the repository had... so if you want renaming to break builds... it won't.
ie. create repo named test_repo checkout test_repo rename test_repo repo in Bitbucket interface (zz_test_repo) you will still be able to create a change and commit and continue like nothing happened with the test_repo
I don't like this "feature", but it is what it is, sadly.
Upvotes: 1
Reputation: 401
To rename your bitbucket repo you can do 2 simple actions:
Upvotes: 7
Reputation: 1531
I think this is the easiest way:
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:
git remote set-url origin new_url
mv projectname newprojectname
Upvotes: 32
Reputation: 2050
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.
Upvotes: 9
Reputation: 2576
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
Upvotes: 104