Now, you can ask Git to do all of that for you, by writing: $ git shortlog v2.38.0. Then, we sort the output, and count the number of unique values. There, -date='format:%Y-%m' tells Git to output each date field like YYYY-MM, and -format='%cd' tells Git to output only the committer date (using the aforementioned format) when printing each commit. date='format:%Y-%m' -format='%cd' | sort | uniq -c Before, you might have written something like this monstrosity: $ git log v2.38.0. One neat use is being able to get a view of how many commits were committed each month during a release cycle. This release, git shortlog became even more flexible by learning how to aggregate commits based on arbitrary formatting specifiers, like the ones mentioned in the pretty formats section of Git’s documentation. Would count each commit to its author as well as any individuals in the Co-authored-by trailer. For example, something like: $ git shortlog -ns -group=author -group=trailer:co-authored-by We’ve talked about git shortlog in the past, most recently when 2.29 was released to show off its more flexible -group option, which allows you to group commits by fields other than their author or committer. For example, many projects (including Git 1) use git shortlog -ns to produce a list of unique contributors in a release, along with the number of commits they authored, like this: $ git shortlog -ns v2.38.0. Git shortlog is used to summarize the output produced by git log. But you may not be as familiar with its cousin, git shortlog. If you use Git on the command-line, you have almost certainly used git log to peruse your project’s history. To celebrate this most recent release, here’s GitHub’s look at some of the most interesting features and changes introduced since last time. We last caught up with you on the latest in Git back when 2.38 was released. The open source Git project just released Git 2.39, with features and bug fixes from over 86 contributors, 31 of them new.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |