Created
July 6, 2016 09:53
-
-
Save ismusidhu/a828f6adaafd1b73cc64f5bd76a9a252 to your computer and use it in GitHub Desktop.
Delete long list of remote branches in bitbucket GIT repository. (Run in chrome console after logging in)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var userAccount = '<userNameOrCompanyAccountName>'; | |
var repoName = '<repoName>'; | |
var branches = ['<list of branches to delete>']; | |
for (var i = 0; i < branches.length; i++) { | |
$.ajax({ | |
method: 'DELETE', | |
url: 'https://bitbucket.org/!api/1.0/repositories/' + userAccount + '/' + repoName + '/_branch/' + branches[i] | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment