Of Code and Me

Somewhere to write down all the stuff I'm going to forget and then need

Generate a changelog for the current branch in Git September 2, 2011

Filed under: Git — Rupert Bates @ 3:04 pm

I find it useful to be able to quickly generate a list of all changes in the current branch which have not yet been merged into master. It’s a good way to come up with a change list when doing a release for instance. To do this in git you can use the following:

git log master.. --pretty="%s"

This assumes that you are on a branch which is off master (if you are on master you could use the path ..my-branch) and that the changes have not yet been merged into master, and it will give you a list showing only the commit messages, ready for copying and pasting into that release note.

Advertisements
 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s