![]() Git log -pretty=format:"%h - %an, %ar : %s" | wc -l ![]() Then how can I prove you that the number of commits really differ? maybe counting counting: The screenshot for only 2 weeks will be the same as for previous command because the visible 8 lines in the screenshot are just the same. Let’s only get the items from the last 2 weeks: git log -pretty=format:"%h - %an, %ar : %s" -since=2.weeks The problem with the last command is that it returns pretty much everything. We could even format the output in a way that we it to be: git log -pretty=format:"%h - %an, %ar : %s" Let’s improve this: git log -pretty=oneline Formatting the commit logs to “one-liners”Ĭool, but there’s too much distractive information. Using git log in your CLI allows you to see commit messages: git logĤ. Just clone the repo and change into the created folder: git clone I’m aware that they use annotations for their commit messages. Clone a git repo that uses annotations in commit messagesįor this demo I use the publicly available OpenUI5 JavaScript library. What a coincidence that OpenUI5 uses such annotations □Ģ. When we talk about release notes we might want to list only features added since the last release something we also want to generate from the commit messages. ![]() you could generate json files containing the features – maybe to display these features inside the help menu of your web application □ For simplicity we’ll just create a simple list. In more advanced scenarios you could also generate files of a certain format, i.e. Git commit -m “ my documentation change”īased on the annotations above, it’s quite easy to generate a simple list that contains for example all features, or all features and bug fixes etc. Let’s assume you have agreed in your project to prefix git commit messages with one or more of certain prefixes (not necessarily for all changes/commits): We’re going to use simple commands instead of using one of the many tools available… And keep in mind that there are many options available even when using git commands, the ones listed here are just some of the options you have… 1. We’ll simply use the public OpenUI5 repo on GitHub, but it works with any other git repo as well (using corresponding git commit messages). ![]() To follow this blog make sure you have installed git. This blog works for anyone who uses git in combination with annotations in the git commit messages. In fact, what you will read can be easily used to create/generate release notes for your apps (i.e. Just a few hours ago I promised Wouter Lemaire to write this blog: Instead of leaking new UI5 features I’ll show you how easy it is to find out new features using just a few commands. Tomorrow, em… Today in just a few hours UI5Con 2018 St. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |