Merging a Pull Request
You will receive an email once the reviewer completes your review. Go back to GitHub, look at the status of your pull request.
Scroll down the page, and you should see a section similar to the screenshot above. Under the Changes reviewed section, we see that our reviewer approved the pull request. Also in this section is a message stating whether the merge can be done automatically. In our case, there will be no conflicts, allowing us to click the green Merge pull request button.Earlier in GitHub Desktop, when we created the pull request, there was a similar message about automatic merging. As mentioned earlier, if you are following the directions outlined here, your pull requests will not have conflicts. If you do have conflicts, reach out to your mentor for assistance.
Click the green button labeled Merge pull request.
You will get a confirmation dialog after clicking the Merge pull request button. In this dialog, you can edit the commit message for the merge along with more details if needed. Click the green Confirm merge button to continue.
Confirming the merge takes the changes from your branch and merges them into main. The pull request is closed as well.
You will see a dialog indicating that the pull request has been merged successfully, and you will be given the option to delete the branch that was just merged. You do not have to delete the branch, but it is a good practice. Note: Removing the branch on GitHub does not remove the branch on your local repository.
You will notice that after deleting the branch, you can restore it if necessary. We have a few more things to do in GitHub Desktop.
Click the Current Branch drop-down and select the main branch.
Once you have made the Current Branch the main branch, click the Fetch origin button to update your local repository with the changes from GitHub (remote).
Keeping your local main branch up to date after a pull request will ensure that you have all of the updates locally.
Problems
You will encounter problems with using Git in the bootcamp. It’s to be expected when you are learning. Don’t worry because the problems rarely lead to loss of work. When you encounter problems reach out on Discord for help. Fellow Students and Mentors will be able to help.