I would like to show how many changes (insertions+deletions) I made on a feature branch. Is there a way to get a summary of the git log --stat
output for the changes between 2 commits (branch root / tip).
Thanks.
git log --stat. The --stat flag causes git log to display. the files that were modified in each commit. the number of lines added or removed. a summary line with the total number of files and lines changed.
Graph all git branchesDevelopers can see all branches in the graph with the –all switch. Also, in most situations, the –decorate switch will provide all the supplemental information in a formatted and nicely color-coded way.
On GitHub.com, you can access your project history by selecting the commit button from the code tab on your project. Locally, you can use git log . The git log command enables you to display a list of all of the commits on your current branch. By default, the git log command presents a lot of information all at once.
for a feature branch you wand to use
git diff --stat dev..feature
this relies on not doing back merges. See my post here: http://dymitruk.com/blog/2012/02/05/branch-per-feature/
--stat
can take parameters. This is useful if you have a wider terminal. You can do --stat=200
to say that your display can accommodate 200 columns.
If you want to use this in a script, use --numstat
instead. It will not truncate paths.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With