![]() ![]() While you can't undo a pull request, you can revert the merged commit from a pull request if necessary. Select Fast forward if the destination branch has no new commits since you created the source branch. Fast-forward merges move the source branch tip up to the destination branch tip, combining commit histories. Because this strategy moves the source branch's commits to the destination branch, you'll still see all commits on the Commits page. Select Squash to make your commits list less cluttered, which results in less time to search for commits that introduce a bug (with a git bisect) and provides an easy-to-follow commit history. Because this strategy combines all commits when you merge, you'll only see one commit on the destination branch on the Commits page. Merge commits are also useful if, as part of your workflow, pull requests are large in scope and you review commits individually. Because this strategy keeps all commits during the merge, you'll still see all commits from the source branch on the Commits page. Select Merge commit when you want to maintain an exact history of changes. The type of strategy you choose to use depends on the workflow you've created for your workspace and how you use your repository. The merge strategy defines how you want the commit history to appear when you merge a pull request. Both strategies merge all your commits from your source branch to the destination branch. Has failed builds on the most recent commitĪs an administrator or a reviewer on a pull request, you can view the merge checks (required or otherwise) in the top merge check panel on the right sidebar to see what has and has not yet been completed prior to approving the pull request. If this checklist item has a warning labelĪt least successful builds on last commitĭoesn't have that number of successful builds for the most recent commit (Optional) If you're merging two branches in the same repository, you can select the Close source branch checkbox to remove the branch from the list of repository branches. This option is the same as entering git merge -ff-only in the command line.įor more details on these two types of merge strategies, refer to Merge strategies below. However, you will be able to see the commit history of the pull request and view the individual commits.įast forward-Moves commits from the source branch to the destination branch (if the destination has no new commits). The pull request will now contain identical changes between the two branches, so the pull request will show no diff. This is because we use the commit graph to detect that changes were applied, and when ‘squash merge’ is used, we cannot detect that the pull request was merged or display an accurate diff. Note: When you enter git merge -squash in the command line locally, the pull request will remain in the ‘open’ state after you push the changes to Bitbucket. This option is the same as entering git merge -squash in the command line. Squash-Combines your commits when you merge the source branch into the destination branch. This option is the same as entering git merge -no-ff in the command line. Merge commit-Keeps all commits from your source branch and makes them part of the destination branch. (For Git repositories only) Select a Merge strategy from these options: (Optional) Update the Commit message with more details. ![]() Merging your changes is the final stage of the pull request process. ![]() After you merge a pull request, you can revert the pull request to remove the merge commit from the repository. When the desired number of reviewers have approved a pull request, you can merge the pull request if you have write (or admin) permission on the repository. If you've been touching the same code as someone else, you may have a merge conflict that you need to resolve locally. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |