666 B
666 B
| title | seo_description | date | draft | snippet_types | |
|---|---|---|---|---|---|
| wipe git commit times | Snippet on how to remove timestamps from a git repo | 2022-01-14T10:59:50+01:00 | false |
|
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.