Git

There are times that as a developer who primarily responsible for the deployment can use a little helping hand on getting the right source and builds for a release. After all, the artefacts coming out of it can be the same one that’s going to be deployed in production. It’s really important that we check each and every code commits as well as their impacts.

One thing I do in this situation is I use the git log to give me the information of the sources and commits that will be part of the release:git log --pretty=format:"%h - %an, %ar, %ae : %s" --stat --name-only --graph --since=2015-01-01 >> logme.log

Let’s run this down bit by bitgit log is a git command that gets the details of the commits--pretty=format can be used to specify a specific format using "%an, %ar, %ae, : %s". Thats author revision, name, email and file.--stat to show the statistics--name-only to show the filenames only-- graph to show a graphical representation--since to show only the commits made from the given date up to the current date (today)

How about a graph only? I ran the same git log but only passed a format and a –graph argument. Output below.
$ git log --pretty=format:"%h %s" --graph
* 2d3acf9 ignore errors from SIGCHLD on trap
* 5e3ee11 Merge branch 'master' of git://github.com/areyes/hubbys
|\
| * 420eac9 Added a method for getting the current details to the branch.
* | 30e367c timeouts
* | 5a09431 add timeout protection to hubbys
* | e1193f8 support for heads with slashes in them
|/
* d6016bc require time for xmlschema
* 11d191e Merge branch 'hubbys' into local

There’s a lot of format options available for git log that can be found here and given these, a lot of automations can be created!

Idea: You can echo this to a file and send it out to developers for verification, or a better idea, loop through the list of users, get each of their emails and revisions, generate the logfile for each and send it out to them. Pretty neat as it will give the developer a bird eye view of their sources that will be included on the release (and notify the team if theirs was not included)