I want fetch branches which I created

Suchitra Shetty
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 19, 2024

I wnat fetch all branches and delete unwanted branches

1 answer

0 votes
Peter Van de Voorde
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 19, 2024

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

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 20, 2024

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events