Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git: changelog day by day

Tags:

How to generate changelog of commits groupped by date, in format:

[date today] - commit message1 - commit message2 - commit message3 ... [date day+3] - commit message1 - commit message2 - commit message3 ... (skip this day if no commits)  [date day+1] - commit message1 - commit message2 - commit message3 ...  [date since] - commit message1 - commit message2 - commit message3 

Any git log command, or smart bash script?

like image 640
takeshin Avatar asked Jun 04 '10 18:06

takeshin


People also ask

How do I see my git history?

Git file History provides information about the commit history associated with a file. To use it: Go to your project's Repository > Files. In the upper right corner, select History.

What is a git changelog?

A changelog is a file that shares a chronologically ordered list of the changes you've made on your project. It's often organized by the version with the date followed by a list of added, improved, and removed features.

What does the command git log Oneline graph do?

The git log - -oneline summarizes git log and collapses the git log details into one line. It shortens the SHA hash to it first seven digits. If the commit message extends longer than a line, it is compressed to one line.

What is the git command to view all the commits since?

The most basic and powerful tool to do this is the git log command. By default, with no arguments, git log lists the commits made in that repository in reverse chronological order; that is, the most recent commits show up first.


1 Answers

Here is dirty, but working version of the script I came up with:

#!/bin/bash # Generates changelog day by day NEXT=$(date +%F) echo "CHANGELOG" echo ---------------------- git log --no-merges --format="%cd" --date=short | sort -u -r | while read DATE ; do     echo     echo [$DATE]     GIT_PAGER=cat git log --no-merges --format=" * %s" --since=$DATE --until=$NEXT     NEXT=$DATE done 
like image 59
takeshin Avatar answered Nov 29 '22 08:11

takeshin