Pull requests, the right way
If you're used to using GitHub to open your pull request (PR), then you have probably been doing it all wrong. Let me share how we do this at THE ICONIC.
Introducing your new best friend: Hub. It's a tool from Github that gives steroids to your git command line. The command pull-request is the one to highlight here. In two simple steps you're set:
brew install hub
Not using MacOS? more installation details
By using the CLI command git pull-request you will create a pull request on GitHub that, by default, compares your current branch against master.
You can choose a branch that’s not master: git pull-request my-branch
Instead of filling in all the fields in the GUI, Hub will use your commit message. That’s when writing good commit messages starts to make sense! Also, making your PR small will make it easier for people to review.
Git allows you to write one message per commit. A commit should be small and concise like every PR. You must review all your changes, so
Do one commit per pull request
This is the logical conclusion and it all makes perfect sense together.
Now go and write good commit messages and save time using the command line to create PR. Wait! Don’t forget to
Be the first one to review your own PR and make sure you're happy with it before everyone else
If you enjoyed this article, please give us a CLAP (or 50!) below and be sure to subscribe to THE ICONIC Tech publication!