Bitbucket Pull Request Not Showing Commits After Pushing to Remote
When pushing commits to a branch and creating a pull request (PR) in Bitbucket, some users experience an issue where the PR does not show the new commits they just pushed.
This can happen for a few reasons, such as Git not recognizing the changes or Bitbucket not refreshing the PR properly.
First, ensure that your Git push was successful.
You can check this by running git log
on your local repository to confirm that the commits are actually present.
If the commits are not visible, it could be due to an issue with your local Git configuration or an incomplete push.
If the commits are visible locally but not on Bitbucket, try the following: make sure you are pushing to the correct remote and branch by running git remote -v
and git branch
.
You should see the correct remote URL and the branch that you are pushing to.
Next, check if there are any Git hooks that might be preventing the push from being completed correctly.
Some hooks, such as pre-push hooks, could block the push if there are issues like merge conflicts, uncommitted changes, or large files.
To bypass hooks, you can use the --no-verify
flag when pushing your changes: git push --no-verify
.
Another reason could be that Bitbucket isn't automatically refreshing the pull request.
Sometimes, Bitbucket caches the pull request view and doesn't immediately display new commits.
To resolve this, simply refresh the page or navigate away and then back to the PR.
You can also try closing and reopening the PR if that helps trigger a reload.
If you're still having trouble, double-check the commit history by running git log
to ensure that your commits are up to date.
Finally, check Bitbucket’s status page to ensure there are no ongoing outages or issues on their end that might be affecting the pull request system.