Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Summary of changes between two commits of branches in Git

Tags:

git

What command can I use to know how many files are different between two branches, just a summary, not the actual files. Something like:

51 Modified
 3 Deleted
 4 New files
like image 485
Roger Avatar asked Jun 06 '13 18:06

Roger


People also ask

How do I see changes between two commits?

To see the changes between two commits, you can use git diff ID1.. ID2 , where ID1 and ID2 identify the two commits you're interested in, and the connector .. is a pair of dots. For example, git diff abc123.. def456 shows the differences between the commits abc123 and def456 , while git diff HEAD~1..

How do I compare the differences between two branches in GitHub?

On the Github, go to the Source view of your project. You will see a link named 'Branch List'. Once the page opens you can see a list of all the remote branches. Hit on the Compare button in front of any of the available branches to see the difference between two branches.

Which git command shows the changes between commits?

The git diff command displays the differences between files in two commits or between a commit and your current repository.


1 Answers

Try git diff --stat. And there's the even shorter --shortstat.

e.g. on branch master type git diff --stat otherbranchname

like image 140
Steven Lu Avatar answered Oct 03 '22 14:10

Steven Lu