git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Question about pull-requests

From
Kevin Daudt <me@ikke.info>
Date
Feb 22, 2016, 16:37 UTC
Message-ID
<20160222163731.GA4154@ikke.info>
In-Reply-To
<CAOh0v-WW=hOXw=uTdzkd3afzXCguBHWdaDShwKE3QKqUCOBTzg@mail.gmail.com>
On Mon, Feb 22, 2016 at 05:24:15PM +0530, Nagaraj Mandya wrote:
Show 14 quoted lines
> Hello,
>   In our GIT repository, all users are restricted from merging to
> master without a pull request. This works well and all developers are
> raising pull requests and merging. However, if there is a merge
> conflict during the merge, we have a problem.
> 
>   We follow the instructions provided by Bitbucket and the final step
> is to push the merged code to master to the "origin" repository.
> However, that steps always fails with the error that pushes can only
> be made with pull requests.
> 
>   How do we work around this problem? We want all pushes to happen
> through merge requests but still allow pull requests with merge
> conflicts to get pushed. Thanks.

The usual way to solve this is to rebase those commits of the pull requests on the updated master. That allows the one who makes the pull request to solve the issues, and then push the branch again (adding --force-with-lease because you've rewritten history).

This should update the pull request, but now it should be able to be merged without conflicts.

That way, you are not required to merge locally into master and push that.

The merge local option will only work if at least someone has rights to push to master, but that is a bitbucket question, not a git question.

Previous: Nagaraj MandyaNext: Jeff King
Message 2 of 4 in “Question about pull-requests”
  1. Nagaraj MandyaFeb 22, 2016
  2. Kevin DaudtFeb 22, 2016
  3. Jeff KingFeb 22, 2016
  4. fhaehnelFeb 23, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.