I'm working with JetBrains PhpStorm and integrated one Bitbucket and one Github remote repositories at once. Bitbucket repository was created much later, and had only one commit, with the working tree of the github master branch.
After making some changes in the github branch, I made "git checkout bitbucket" (local branch tracking Bitbucket master), "git commit", "git push".
After that, I have that one more commit in the Bitbucket master branch, but also, on the Bitbucket Commits tab, I have like a separate branch with all the commits from Github, it is before master and of different color.
However, I don't need those commits and didn't intend to push them, I also don't see them in the PhpStorm Git tab. I can't see that branch on the Bitbucket Branches tab, and when I click any of its commits, its branch is shown as "master", and points to a branch that doesn't have that commit!
How is this possible and how do I delete these unrelated commits from my Bitbucket repository?
On the screenshots you can see that "da40a66" is actually the same as "844cf5c", but created earlier
Turns out that branch appeared when I accidentally pushed the tags from all branches (including Github master), and they pulled their history with it.
When I run "git push --delete bitbucket 4.3.0 4.0.1" (the last and first tags of the Github master), it disappeared.
Still, it was misleading to me that the branch name was "master" although it wasn't related to Bitbucket master. And it linked to the branch page that didn't have those tags, so I could only see them on the Commits tab.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.