When you try to document you changes in a typical CHANGELOG file, you don’t want to write all the changes since the last release or last few commit there by hand. This should be done easily by some kind of command that will export all your changes to the CHANGELOG file.
There are two easy ways to do this, that will basically do the same. the only difference between them is that one extracts the commit messages directly with the help of git log, while the other lists all changes of the current branch.
Now let’s have a first at the awful complicated solution to get the commit log for your current branch
git show-branch | awk -F"merb_localize.*]( )*" " {print \$2}" > CHANGELOG
To get this working for your project you have to replace merb_localize with your own branch name.
The second solution is a little more sophisticated and better to handle, it is based on git log instead of git show-branch
git log --pretty="format:%s (committer: %cn | auther: %an)" ... > CHANGELOG
What happens is that it will go through all commit messages and format the commit message using the defined format with the --pretty. The result will look like:
* my message (commiter: Martin | author: Martin)
There are plenty of format options to modify the output written to the CHANGELOG file. You can find the options in the man page for git log.