--- title: "wipe git commit times" seo_description: "Snippet on how to remove timestamps from a git repo" date: 2022-01-14T10:59:50+01:00 draft: false snippet_types: - git --- Some time you don't want everyone to know exactly when you committed. This command will wipe the time stamps and set them all to today at 0:00h. ``` git filter-branch --env-filter ' GIT_AUTHOR_DATE="$(date +%Y-%m-%d) 00:00:00+0000" GIT_COMMITTER_DATE="$(date +%Y-%m-%d) 00:00:00+0000" ' -- --all ``` It works best on fresh repos just be for pushing to remote for the first timee. [source](https://exceptionshub.com/remove-time-and-time-zone-of-all-git-commits-but-keep-date.html)