I’m working out of NYC this week, and putting in a little leisure coding time this evening. I realized as my nvALT git logger note updated that I was only running the logger on my home machine and it wasn’t logging things I didn’t explicitly ssh in and pull down. I updated the script tonight to do a fetch before and include remotes when it creates the log entries.

To recap, this is a simple script to grab a log of local git repositories specified in a ~/.gitlogger file, format it in Markdown and add it to a local text note and/or Day One.

In addition to handling any commits pushed to a known remote, it now limits the commit log to only commits authored by the user.name setting in your .gitconfig file, or (if that fails) the contents of the environment variable GIT_COMMITTER_NAME. If neither of those exist, it will allow all authors into the log. Further, I’m limiting the commits to the working branch (excluding my feature/hotfix branches), and ignoring merge commits. That keeps things trim.

Lastly, I added a minor formatting change to insert a Markdown horizontal rule between entries. It’s the little things that count.

If you happen to care about this bizarre little project, the gitlogger.rb gist is updated, and you can check the original post for full code and installation instructions.