Gomp is a free command line tool to compare Git branches with ease. It takes names of two git branches from you and then shows you the results right on the command line or terminal. This is a simple and open source tool that is very useful for developers and testers. With this, you can quickly compare commits in different branches of a repository and then take further actions if necessary. By running a simple command, you can visually analyze matching commits and their order.
There are not so many tools to visually compare any two branches of a git repository. But luckily, you can use the free and open source tool that I have mentioned in this post. You can quickly install it from the terminal and there is just single command for its installation and use. It even uses color coding in the output that it produces. Based on the status of commits in the branches, it to colors the output as green, red, yellow and purple. Each color code have its own meaning that I will mention later in the post.
Using this Free tool to Compare Git Branches for Commits and Commits Order:
Getting started with Gomp is very easy. To install it on your computer, you only need Python available. After making sure that Python is available, you just run the following command and it will install it.
python -m pip install gomp
Now using it also very simple. You just change your current directory to a valid git repository. Make sure that the current repository has some branches so that they can be compared. To compare any two branches of the given repository, you run the following command in the specified syntax below.
gomp branch1 branch2
In the screenshot above, you can see how this command line tool works. In just blink of an eye, you can see the output that it produces and analyze it based on the color coding that it uses, the green color indicates that the comments match in both branches. Yellow color indicates that come it matches but their order is different. Red color indicates that a commit is on the target branch and not on the source branch. And finally, the purple color indicates that a commit is on the source branch and not on the target one.
So if you are a developer for programmer and looking for ways to compare any two to git branches then you are at the right place. Just use the symbol command line tool that is mentioned here, compare branches with it by running simple commands and see the output and analyze the result based on the different color codes that it uses.