In Bitbucker I get other person commits along with my commits for my branch pull request.
- Create two branches from master branch.(Assume A & B)
- In Controller Class added two different functions for same line by two members. (I and my friend added separate new function for controller class in two separated new branch)
- Created pull requests for master branch by two branches A & B.
- Approved branch A to merge request.
- Branch A merged to master.
- Branch B get conflicts.
Tried To Resolve Conflicts Branch B
- Checkout to master
- git pull
- checkout to Branch B.
- git rebase master
- added new function to controller next to A branch function.
- git add
- git commit
Get an error ##
error: failed to push some refs to, hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Integrate the remote changes (e.g. hint: 'git pull ...') before pushing again.
Resolve
- git pull --rebase
- git add
- git commit
- git push
Then now I get other team member commits in my commits list mentioning as a "merge pull request" Now I can not continue merger request to master branch. I got error message from bitbucket,
"The merge could not be completed because the repository is configured to require fast-forward merges and the target branch contains commits which are not present in the source branch. To perform this merge, either merge 'master' into 'vp-42', or rebase 'vp-42' onto 'master'"