I have created feature branch from master and made some commit and pushed to bit bucket server repository. Later when I merge master into feature branch and try to push merge commit to remote branch git throws error saying " The commit with the hash "73be7c9527" has two parents, but merge commits are not allowed". I would really appreciate if anyone help me solving this issue. Thanks.
C:\repo>git push Counting objects: 105, done. Delta compression using up to 4 threads. Compressing objects: 100% (92/92), done. Writing objects: 100% (105/105), 52.83 KiB | 0 bytes/s, done. Total 105 (delta 46), reused 0 (delta 0) remote: [The commit with the hash "%s" has two parents, but merge commits are not allowed] The commit with the hash "73be7c9527fc" To http://************:7990/scm/*/repo.git ! [remote rejected] OO-23554 -> OO-23554 (pre-receive hook declined) error: failed to push some refs to 'http://********:7990/scm/*/repo.git'
Community moderators have prevented the ability to post new answers.
Sounds like your repo has the "Reject Merge Commits Hook" add-on enabled.
Ask around your company to figure why they've enabled it. Personally, I think my Control Freak add-on is a better solution for stopping spurious "git pull" merges (aka foxtrot merges).
p.s. Be sure to try out our PR-Booster for Bitbucket Server add-on!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.