31,040
edits
| Line 150: | Line 150: | ||
=Statistics= | =Statistics= | ||
To | To count number of changes developers have made between a version x and y: | ||
* First, run git merge-base to know the id of last common commit between x and y | * First, run git merge-base to know the id of last common commit between x and y | ||
<source lang="bash"> | <source lang="bash"> | ||
| Line 163: | Line 163: | ||
git log --ancestry-path --numstat --pretty="%H" id_found_at_previous_step..HEAD | awk 'NF==3 {plus+=$1; minus+=$2} END {printf("+%d, -%d\n", plus, minus)}' | git log --ancestry-path --numstat --pretty="%H" id_found_at_previous_step..HEAD | awk 'NF==3 {plus+=$1; minus+=$2} END {printf("+%d, -%d\n", plus, minus)}' | ||
</source> | </source> | ||
To count number of changes finally between a version x and y (it differs from previous count because in previous count, a change can be done 2 times at two different moment to change differently. With second method, you count change finally found if changes were ok at first try): | |||
* Use same method than previously but instead of running git log, run git diff. | |||
<source lang="bash"> | |||
git diff --numstat --pretty="%H" id_found_at_previous_step..HEAD | awk 'NF==3 {plus+=$1; minus+=$2} END {printf("+%d, -%d\n", plus, minus)}' | |||
</source> | |||
More information in GIT usage is available [http://wiki.eclipse.org/EGit/User_Guide here]. | More information in GIT usage is available [http://wiki.eclipse.org/EGit/User_Guide here]. | ||