Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Error : The commit with the hash "%s" has two parents but merge commits are not allowed

Akshay Pitale July 15, 2016

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'

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

2 votes
G__Sylvie_Davies__bit-booster_com_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 15, 2016

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!

 

TAGS
AUG Leaders

Atlassian Community Events