31,040
edits
| Line 225: | Line 225: | ||
git show-ref --tags | git show-ref --tags | ||
</source> | </source> | ||
Choose a value for id_start and id_end | |||
Note: id_end can be HEAD. | |||
* Then run git log to have list of all changes from last common commit to last commit | * Then run git log to have list of all changes from last common commit to last commit | ||
<source lang="bash"> | <source lang="bash"> | ||
git log | git log id_start..id_end | ||
</source> | </source> | ||
* To get total number of added/deleted lines: | * To get total number of added/deleted lines: | ||
<source lang="bash"> | <source lang="bash"> | ||
git log --ancestry-path --numstat --pretty="%H" | git log --ancestry-path --numstat --pretty="%H" id_start..id_endp | awk 'NF==3 {plus+=$1; minus+=$2} END {printf("+%d, -%d\n", plus, minus)}' | ||
</source> | </source> | ||
| Line 238: | Line 240: | ||
* Use same method than previously but instead of running git log, run git diff. | * Use same method than previously but instead of running git log, run git diff. | ||
<source lang="bash"> | <source lang="bash"> | ||
git diff -b -M --numstat --pretty="%H" | git diff -b -M --numstat --pretty="%H" id_start..id_end | awk 'NF==3 {plus+=$1; minus+=$2} END {printf("+%d, -%d\n", plus, minus)}' | ||
</source> | </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]. | ||