I wnat fetch all branches and delete unwanted branches
Hi @Suchitra Shetty ,
Welcome to the Atlassian Community.
Here is an Atlassian Git Tutorial that will help you figure this out: https://www.atlassian.com/git/tutorials/syncing/git-fetch
Cheers,
Peter
Hi @Suchitra Shetty,
Just adding to Peter's reply that if you want to delete certain branches after fetching them locally, you can do it the following way:
Deleting a local branch
You can use the following command to delete a local branch:
git branch -d branch-name
This will delete the local branch with the name branch-name. It will not delete the remote branch with the same name that exists in Bitbucket.
Deleting a remote branch
If you want to delete a remote branch named branch-name, you can run the following command:
git push remote --delete branch-name
remote is usually origin, but it could be different. You can run the following command in your clone to find out the name of the remote:
git remote -v
Remote branches can also be deleted on Bitbucket's site from the Branches page of the repo.
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.