From: Kevin Daudt <me@ikke.info>
To: Nagaraj Mandya <nmandya@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Question about pull-requests
Date: Mon, 22 Feb 2016 17:37:31 +0100 [thread overview]
Message-ID: <20160222163731.GA4154@ikke.info> (raw)
In-Reply-To: <CAOh0v-WW=hOXw=uTdzkd3afzXCguBHWdaDShwKE3QKqUCOBTzg@mail.gmail.com>
On Mon, Feb 22, 2016 at 05:24:15PM +0530, Nagaraj Mandya wrote:
> 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.
next prev parent reply other threads:[~2016-02-22 16:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-22 11:54 Question about pull-requests Nagaraj Mandya
2016-02-22 16:37 ` Kevin Daudt [this message]
2016-02-22 21:37 ` Jeff King
2016-02-23 2:58 ` fhaehnel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160222163731.GA4154@ikke.info \
--to=me@ikke.info \
--cc=git@vger.kernel.org \
--cc=nmandya@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).