CodeNewbie Community 🌱

Discussion on: Pull requests to branch or commit? Am I doing it right?

Collapse
 
terabytetiger profile image
Tyler V. (he/him)

I'll try to address everything - if I miss any specific questions let me know and I can try to answer those as well :)

  • The Pull Request is a request to merge your branch into the target branch (tidythemes:master here). Until the PR is merged, future commits to your branch will be included in the PR. This way if the repository owner wants any adjustments to the branch before merging, you can make changes without having to open a new PR.

  • Many open source projects will include a CONTRIBUTING.md file which outlines their preferred process for submitting PRs. It may include opening an issue first, it may not. In my experience it's fine to just create a PR if there is no issue - and open an issue if you aren't planning to fix it (again - my experience, some repository owners may have alternative preferences).

  • The above also addresses the "One big PR or 3 small PRs" question, but if it's not outlined in the contributor guidelines, it's up to you to determine if the issues are related or small enough to roll into a single PR or split into separate requests.

  • You do need to commit -> push -> create PR. Commits are like "save points" and if you never commit and push, the branch won't have any new save points to compare back to the original source.

I think your experience is a common one - git isn't particularly user friendly at first 😅 And it feels particularly insulting when it creates the commits for reverting commits (imo).

Collapse
 
robertandrews profile image
Robert Andrews

Thanks Tyler.