Sai G Sai G - 26 days ago 8
Git Question

How to delete local and remote repositories in bitbucket using command line in windows OS?

I am trying delete local and remote repositories in bitbucket using git bash.

I am able to delete my local repository using .git directory in myroot-directory of my repository, but

git remote rm repositoryURL


used to delete remote report but i could not.

Can you please help me
Thanks

Answer

You've got a few problems here.

git remote rm repositoryURL

used to delete remote report but i could not.

First, git remote rm is used with the name of the remote, not its URL. You'd have to do something like git remote rm origin.

This updated command won't work because you have already deleted .git/, so you no longer have a local repository. git remote requires a local repository.

But even if you'd run git remote rm before deleting .git/ it wouldn't remove the repository on Bitbucket. The documentation says that git remote rm <name>

Remove the remote named <name>. All remote-tracking branches and configuration settings for the remote are removed.

This simply configures your local copy to forget everything it knows about the remote. The repo on Bitbucket will still exist, e.g., you could clone it again.

To actually remove the repository from Bitbucket you have to log into its web interface and do it there (or possibly use the API).