Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dealing with declined pull request in bitbucket

Tags:

git

bitbucket

I have project hosted on bitbucket and I am hoping someone can explain how to deal with declining a pull request.

i.e. if someone uses the bitbucket interface to add code, submits a pull request and it turns out their code is bad.

How do I remove/revert the bitbucket repo and delete the branch that bitbucket created for the pull request etc ?

like image 381
mikeC Avatar asked Mar 26 '14 10:03

mikeC


1 Answers

I can happily try to clarify a couple of things for you!

  • There is a button in the UI that will allow you to decline the pull request. You can also communicate around the changes through the pull request in Bitbucket. The user can always make another pull request after having one declined.
  • A pull request is not a Git object of any kind, rather its a common feature of Git repo management tools like Bitbucket and Github. This is to say that when a pull request is made, there is no branch created specifically for that pull request.
  • A pull request is a "request for action" of sorts, which asks the following: "If the changes on my FEATURE_BRANCH look good to you, can you please let me know so that we both agree they can be merged into the TARGET_BRANCH".
  • Bitbucket allows you to approve and merge pull requests from its GUI, with an option to delete the feature branch after merging.
  • Regardless of whether a pull request was made for a particular branch or not, you can always delete a branch from the branches view in Bitbucket.

Remember to follow a workflow that works for you and your team. A pull request always has a feature branch and a target branch, so you shouldn't have to worry about reverting changes on your target branch. If you do run into a scenario where you need to undo commits or changes history, have a look at Git reset and Git rebase commands.

For more information/reading on pull requests in Bitbucket, have a look here

If you'd like me to provide any additional clarification for you, then just ask!

like image 130
rdgd Avatar answered Oct 09 '22 15:10

rdgd