Fazer merge de uma pull request
Faça merge de uma pull request no branch upstream quando o trabalho estiver finalizado. Qualquer pessoa com acesso push no repositório pode completar o merge.
Neste artigo
Sobre merges de pull request
Se a pull request apresenta conflitos de merges ou se você deseja testar as alterações antes de fazer merge, é possível fazer checkout da pull request localmente e fazer merge usando a linha de comando.
Se decidir que não quer que as alterações em um branch de tópico sofram merge no branch upstream, é possível fechar a pull request sem fazer merge.
Revisões obrigatórias
Repository administrators can require that all pull requests receive a specific number of approving reviews from people with write or admin permissions in the repository or from a designated code owner before they're merged into a protected branch. Para obter mais informações, consulte "Sobre branches protegidos".
When required reviews are enabled, anyone with access to the repository can approve changes in a pull request. However, you won't be able to merge your pull request until the required number of reviewers with write or admin permissions in the repository approve your pull request's changes in their review. For more information about repository permission levels, see "Repository permission levels for an organization." If review is required from a designated code owner and the pull request affects code that has a designated owner, approval from that owner is required.
If a pull request has changed since it was reviewed and the person who requested changes isn't available to give an approving review, repository administrators or people with write access can dismiss a review. Para obter mais informações, consulte "Ignorar a revisão de uma pull request".
After all required reviewers have approved a pull request, you won't be able to merge it if there are other open pull requests with pending or rejected reviews and those pull requests have a head branch pointing to the same commit. Someone with write or admin permissions will need to approve or dismiss the blocking review on the other pull requests before you can merge.
Fazer merge de uma pull request no GitHub
-
Under your repository name, click Pull requests.
-
Na lista "Pull Requests", clique na pull request que deseja fazer merge.
-
Dependendo das opções de merge habilitadas em seu repositório, é possível:
- Fazer merge de todos os commits no branch de base ao clicar em Merge pull request (Fazer merge de pull request). If the Merge pull request option is not shown, then click the merge drop down menu and select Create a merge commit.
- Squash the commits into one commit by clicking the merge drop down menu, selecting Squash and merge and then clicking the Squash and merge button.
- Rebase the commits individually onto the base branch by clicking the merge drop down menu, selecting Rebase and merge and then clicking the Rebase and merge button.
Observação: rebase e merge sempre atualização as informações do committer e criarão SHAs de commit novos. Para obter mais informações, consulte "Sobre merges de pull request".
-
If prompted, type a commit message, or accept the default message.
-
Click Confirm merge, Confirm squash and merge, or Confirm rebase and merge.
-
Opcionalmente, exclua o branch. Assim, a lista de branches do repositório ficará limpa.
As pull requests sofrem merge com a opção--no-ff
, exceto pelas
pull requests com commits com combinação por squash ou com rebase/<2>, que passam por merge com a opção fast-forward.
You can close corresponding issues using a keyword in your pull request or commit message. For more information, see "Closing issues using keywords."
Leia mais
- "Reverter uma pull request"
- "Sincronizar seu branch" usando o GitHub Desktop
- "Sobre merges de pull request"
- "Solucionar conflitos de merge"