Your team tags every release in a Git repository. The two most recent tags are v1.2.0 and v1.3.0. You want the changelog section for version 1.3.0 to be built automatically from the commits added after v1.2.0 up to and including v1.3.0. A team script, format-changelog.sh, formats the commit list before it is saved.
How should you complete the command?
git v1.2.0..v1.3.0 | ./format-changelog.sh > changelogs/1.3.0.md
- Blank 1: log (correct answer)
git loglists commits and their messages, which is the content a changelog is built from.diffoutputs line changes to file content, not the commit list.blameannotates the lines of a single file.tagcreates or lists tags rather than listing the commits between them.
Native Git commands can generate changelog content automatically. Running git log over the range between the previous version tag and the new version tag gives one section per version. That output can then be passed to a helper script and written to a changelog file for that version.