265
edits
Gschratzer (talk | contribs) Tag: 2017 source edit |
Gschratzer (talk | contribs) (Undo revision 54744 by Gschratzer (talk)) Tag: Undo |
||
| Line 224: | Line 224: | ||
</source> | </source> | ||
= | =Statistiques= | ||
Avec les outils en Ligne de Commande GIT: | |||
Pour compter le nombre de changerment qu'un développeur a fait entre une version x et 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 235: | Line 235: | ||
</source> | </source> | ||
* | *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 id_found_at_previous_step..HEAD | git log id_found_at_previous_step..HEAD | ||
</source> | </source> | ||
* | *To get total number of added/deleted lines: | ||
<source lang="bash"> | <source lang="bash"> | ||
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)}' | ||
| Line 246: | Line 248: | ||
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"> | <source lang="bash"> | ||
| Line 256: | Line 257: | ||
Plus d'information sur l'utilisation de GIT disponible [http://wiki.eclipse.org/EGit/User_Guide ici]. | |||
edits