You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Join now to unlock these features and more
I cannot find remote branches via the web ui of bitbucket, how is that possible?
When I run locally (i replaced sensitive info with XXXXXXX):
$ git branch -r
In the web UI, all branches selected:
How is this possible ?
The solution was to execute:
git fetch --prune
I tried to remove the old branches by using push --delete, but got an error.
$ git push origin --delete origin/feature/user_management
error: unable to delete 'origin/feature/user_management': remote ref does not exist
Started googling, and stumbled on this post on stackoverflow .
The missing branches are not active anymore.
1. I would expect if I delete them via the webUI, they are also deleted from the git repo, isn't that the case?
2. We do not use pull requests at this moment, but do use git flow. How can I find "closed branches" ?
Actually, the reason I stumbled upon this. is that I wanted to cleanup/remove old branches. But now I don't know where to do this. Via the git prompt? I wanted to do it via the webUI, but that seems not possible, because they are not showing.
BTW; I'm not a git expert by far, just trying to use it ;)
That is not the case - essentially when you create a branch in the UI, it is not present in your local repo until you fetch the branch. Fetching is performed by git pull.
Generally, to view closed branches - you would select "Merged branches" from the dropdown in the UI.
I would suggest reading the following documentation related to GIT branch, this will give information on how to delete/clean these up:
- Ben (Bitbucket Cloud Support)
Thank you. Probably this step:
git push origin --delete crazy-experiment
to delete the temp branch on the server was not performed, after the branches were pushed.
I still think it is strange I cannot see all the branches in the web ui, but I guess I can do the cleanup of the old branches now, and know how to work in the future.