Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How compare two Git branches in Android Studio?

I am not sure if it's possible to compare master branch (or any other) with the current feature branch like GIT does.

I want the Diff between two branches (master and feature branch) so that I can compare the diff before merging.I find Git UI less user friendly. As in AS I can traverse through code and change it right there.

I have found an option where I can compare any branch with my current local branch (that seem's like a solution to me but when I used it I got very confused).

SS!

SS2

Compare with current feature of AS compare two brach with specific selected commit.

While what I required is compare latest of both. (head of feature branch with head of master).Like we get in merge request of Git.

P.S- I thought of selecting all commit's to get the whole diff but it give a very different result something mix of all the diff's.

Want to get something like this.

SS#

like image 259
Anmol Avatar asked Aug 28 '19 06:08

Anmol


People also ask

How do I compare two files in different branches?

The git diff command is used to perform the diff function on Git data sources. For example, commits, branches, files, and so on. It can also be used to compare two files of different branches.

How do you compare two branches and codes?

To compare any two commits in your branch, use the Ctrl key to select the two commits that you want to compare. Then right-click one of them and select Compare Commits. Similar to Commit Details, you can use the Open in New Tab button to open the comparison on a different tab or maximize it on the screen.


1 Answers

I compare by right clicking my 'app' directory --> git --> compare with branch

See entire diff

like image 69
Mitch Thornton Avatar answered Sep 18 '22 05:09

Mitch Thornton