<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/how-i-log-every-git-commit-to-a-plain-text-file-tkytafsgi" -->

---
title: How I log every Git commit to a plain text file | daily.dev
description: A developer shares how they set up a Git post-commit hook to automatically log every commit to a single plain text file, organized by date and project in...
canonical: https://daily.dev/posts/how-i-log-every-git-commit-to-a-plain-text-file-tkytafsgi
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: How I log every Git commit to a plain text file | daily.dev
og:description: A developer shares how they set up a Git post-commit hook to automatically log every commit to a single plain text file, organized by date and project in...
og:url: https://daily.dev/posts/how-i-log-every-git-commit-to-a-plain-text-file-tkytafsgi
og:image: https://api.daily.dev/og/posts/tKYtAFsgi.png
og:image:alt: How I log every Git commit to a plain text file
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How I log every Git commit to a plain text file

**[Flavio Copes](https://daily.dev/sources/flaviocopes)** · 4 min read · 0 upvotes · 0 comments

## Summary

A developer shares how they set up a Git post-commit hook to automatically log every commit to a single plain text file, organized by date and project in reverse-chronological order. The post explains why post-commit was chosen over post-push (Cursor's postToolUse event missed real commits, and Git has no native post-push hook), walks through the Python logger script that captures repo, branch, and commit subject, and describes a Cursor beforeShellExecution hook that auto-installs the post-commit hook in each new project before the first commit — so no manual setup is needed per repository.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://flaviocopes.com/log-git-commits-plain-text>

## Similar posts on daily.dev

- [How I use the same Git work log with Codex and ChatGPT](https://daily.dev/posts/how-i-use-the-same-git-work-log-with-codex-and-chatgpt-dncckvdht) · Flavio Copes · 0 upvotes · 0 comments
- [Let the commits tell the story](https://daily.dev/posts/let-the-commits-tell-the-story-7elnwwldo) · Lobsters · 0 upvotes · 0 comments
- [My Git Reflog Exposed Every “Temporary” Decision I Made as a Software Engineer](https://daily.dev/posts/my-git-reflog-exposed-every-temporary-decision-i-made-as-a-software-engineer-qwfgzotc3) · Medium · 0 upvotes · 0 comments
- [Format Swift with a Git Commit Hook](https://daily.dev/posts/format-swift-with-a-git-commit-hook-4gmlicjcc) · Use Your Loaf · 0 upvotes · 0 comments

---

Tags: [#python](https://daily.dev/tags/python), [#productivity](https://daily.dev/tags/productivity), [#git](https://daily.dev/tags/git)

[View this post on daily.dev](https://daily.dev/posts/how-i-log-every-git-commit-to-a-plain-text-file-tkytafsgi)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"How I log every Git commit to a plain text file","url":"https://daily.dev/posts/how-i-log-every-git-commit-to-a-plain-text-file-tkytafsgi","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/how-i-log-every-git-commit-to-a-plain-text-file-tkytafsgi"},"datePublished":"2026-07-13T10:32:38.931Z","dateModified":"2026-07-13T10:33:03.031Z","description":"A developer shares how they set up a Git post-commit hook to automatically log every commit to a single plain text file, organized by date and project in...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/907c6c028f107fad7d0379f1571dde35?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/907c6c028f107fad7d0379f1571dde35?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Flavio Copes","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Flavio Copes","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/1f2dbd275797411bbd37bfdaaf0951a9","url":"https://daily.dev/sources/flaviocopes"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/how-i-log-every-git-commit-to-a-plain-text-file-tkytafsgi","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"python,productivity,git","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Flavio Copes","item":"https://daily.dev/sources/flaviocopes"},{"@type":"ListItem","position":3,"name":"How I log every Git commit to a plain text file"}]}
```

