Compare your branch before sending the PR
What do you in your workflow? #
Well… there are a few guidelines we all should follow but the truth is every team has different rules and every developer has different habits. When working on a team we have to take care of each other, and that means we must optimize our time and other’s time.
Every time somebody sends a PR it follows a review process that can be good and fast or annoying and repetitive, and that means the reviewer can take more time reviewing, sending comments and rejecting the code in the PR, which is something nobody wants.
What I am going to follow is something I usually do, compare branches, just to see what the reviewer will see in the PR.
How do you compare branches? #
According to the development environment you use, you will find different tools, for example, if you are an old school developer and like to use vim or emacs you will probably be using a difftool like vimdiff or difftool itself.
If you are a an IntelliJ heavy user you have tools integrated to accomplish this task but as we all know IntelliJ suite has a cost and not every developer is willing to pay, which lead us to VsCode (probable best code editor right now).
VsCode compare branches #
VsCode help us to do this task very easily with Source Control.
Then you can select the branch you want and the branch you to compare
And finally you can see all differences between branches