Roland
Roland

Reputation: 67

How can I calculate the number of lines changed between two versions in Git?

Is there any way to calculate the number of lines changed between two versions in Git?

Upvotes: 2

Views: 2481

Answers (1)

Suyog Dahal
Suyog Dahal

Reputation: 131

You can view the number of insertions and deletions made in each commit using:

$ git log --stat

For the changes between any two specific commits, you may use:

$ git diff --stat <commit-id1> <commit-id2>

Upvotes: 6

Related Questions