Skip to content

Latest commit

 

History

History
49 lines (39 loc) · 3.69 KB

1-3-Pull-request.md

File metadata and controls

49 lines (39 loc) · 3.69 KB

1.3. Make a pull request

  1. Open your repository in GitHub (your fork, not the original).

  2. Start a pull request from your part-1 branch into main.

  3. Scroll through the diff (difference comparison) to make sure you haven't accidentally left in debugging code, TODO comments, etc. If you have, remove them and push a new commit.

    ✅ Good practice: Fix problems before review

    You can do this step before or after creating the pull request. Just try to fix any problems before someone else reviews your code, so they can focus on the actual changes.

  4. Fill out the template by briefly describing the changes you've made. Since this is just a tutorial, you don't have to include screenshots, testing evidence, or issue numbers, but feel free to add some as practice.

  5. Click "Create pull request."

    ❓ Hint: Draft pull requests

    You can also create "draft" pull requests for cases where you want the PR in place but aren't quite finished with making changes yet. The option is available by clicking the down arrow next to "Create pull request."

  6. Merge the PR once all checks have passed (it should only take a minute or two).

    🤔 For new developers: Automatic PR checks

    We use GitHub Actions to run some automatic checks on every PR in this repo. They make sure that all files follow Prettier and ESLint rules and that all unit tests pass before you're allowed to merge. If one of these checks fails, investigate it by clicking on the Details link and try to fix the problem. If you're still stuck, feel free to reach out in #onboarding for help.

    ✅ Good practice: Keep main commit history clean

    There are multiple ways to merge a PR on GitHub: merge commit, squash-and-merge, or rebase-and-merge. We generally recommend that you do one of the latter two in order to keep the main commit history clean. Your engineering manager will decide the policy for your project.

    ✅ Good practice: Enforce these practices with your repo settings

    You can enable or disable each PR merge method in your repository settings, as well as set branch protection rules to, say, require automatic checks to pass before a PR can be merged into the main branch. These options are set in the template repo, but they're not copied to repos created from it. Your engineering manager should handle the settings on your future project repository.

  7. Back in your command prompt, checkout and pull the main branch to update it on your local computer:

    git checkout main
    git pull

    You can also delete your old branch locally:

    git branch -d part-1
Previous Up Next
1.2. Implement task checkoff Part 1 Part 2. More features