Reputation: 33
I added a new readme file in my local repo and when I push to develop branch I get this error:
Branch refs/heads/develop can only be modified through pull requests. check your branch permission configuration with the project administrator.
To ssh://bitbucket.companyname.com/devops/devops-appdev.git ![remote rejected] develop ->develop (pre-receive hook declined) error: failed to push refs to 'ssh://bitbucket.companyname.com/devops/devops-appdev.git'
anyone know what the problem is? how can I push it under develop branch?
Upvotes: 3
Views: 21507
Reputation: 520898
The error message already answers your question:
Branch refs/heads/develop can only be modified through pull requests. check your branch permission configuration with the project administrator.
The workflow which the repo owner wants you to follow is for you to push your feature branch to Bitbucket and then create a pull request with develop
as the target branch. The second part of the error message tells you what to do if you think you really should be allowed to push directly to develop
. In that case, you should contact the repo owner and ask for permissions.
Assuming you did all your work directly in the local develop
branch, you could take the following steps:
# from local develop
git checkout -b feature
git push origin feature
Then, from Bitbucket web create a new pull request from feature
with develop
as the destination branch.
Upvotes: 9