I have checked out a working copy of a remote branch, made changes, staged and commited changes, and pushed back to origin. When I review the pull request in BitBucket, I see that one of the files in in conflict status. I completed the following steps:
git pull git checkout <branch> At this point I would expect to see a conflict message. Instead...
From https://bitbucket.org/site
* branch mybranch -> FETCH_HEAD
Already up to date.
So my working copy is already up to date, yet this conflict is still showing. I tried deleting the file and then committing and pushing the delete, but no matter what it still shows the file in the remote branch, in conflict.
When I inspect the file I don't see any conflict tags like >>>>
I did talk to my team and it turns out someone had modified the remote file directly in Bit Bucket last week. I recall doing a git fetch and git checkout (no warnings or errors) and then committing and pushing, and then when I realize changes had happened, went back and did a git pull to get the most up to date version (still no warnings or errors).
What's going on here, and how can I resolve this?
Conflicts noted in the Pull Request view of BitBucket are not conflicts in a commit or on a branch. Instead, they are anticipated conflicts from the Merge action, taking the PR source branch and merging it into the PR target branch.
You can resolve this most easily by rebasing onto the new target branch HEAD.
git rebase origin/<target_branch>
# You might have to fix some conflicts here, but they are less
# likely with a rebase than a merge.
git push
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With